{"action":"created","issue":{"url":"https://api.github.com/repos/cloudius-systems/osv/issues/270","repository_url":"https://api.github.com/repos/cloudius-systems/osv","labels_url":"https://api.github.com/repos/cloudius-systems/osv/issues/270/labels{/name}","comments_url":"https://api.github.com/repos/cloudius-systems/osv/issues/270/comments","events_url":"https://api.github.com/repos/cloudius-systems/osv/issues/270/events","html_url":"https://github.com/cloudius-systems/osv/issues/270","id":31399999,"node_id":"MDU6SXNzdWUzMTM5OTk5OQ==","number":270,"title":"Wasted memory in early malloc()","user":{"login":"nyh","id":584227,"node_id":"MDQ6VXNlcjU4NDIyNw==","avatar_url":"https://avatars3.githubusercontent.com/u/584227?v=4","gravatar_id":"","url":"https://api.github.com/users/nyh","html_url":"https://github.com/nyh","followers_url":"https://api.github.com/users/nyh/followers","following_url":"https://api.github.com/users/nyh/following{/other_user}","gists_url":"https://api.github.com/users/nyh/gists{/gist_id}","starred_url":"https://api.github.com/users/nyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyh/subscriptions","organizations_url":"https://api.github.com/users/nyh/orgs","repos_url":"https://api.github.com/users/nyh/repos","events_url":"https://api.github.com/users/nyh/events{/privacy}","received_events_url":"https://api.github.com/users/nyh/received_events","type":"User","site_admin":false},"labels":[{"id":22726535,"node_id":"MDU6TGFiZWwyMjcyNjUzNQ==","url":"https://api.github.com/repos/cloudius-systems/osv/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":44616269,"node_id":"MDU6TGFiZWw0NDYxNjI2OQ==","url":"https://api.github.com/repos/cloudius-systems/osv/labels/high%20priority","name":"high priority","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2014-04-13T09:08:02Z","updated_at":"2018-12-11T15:55:15Z","closed_at":"2018-12-11T15:53:21Z","author_association":"CONTRIBUTOR","body":"Our malloc() is wasteful in may places, but here is one I just noticed now.\n\nstd_malloc() during early initialization (!smp_allocator) allocates a whole page for every small allocation. Printing out what actually happens in an example run, I saw 819 of these early allocations, most of them asking for 24-72 bytes, but we allocate 4096 bytes for each of them. This is wasting about 0.7 MB of memory. Not huge, but these wasteages add up :(\n\nIt would be nice to make the early allocator less wasteful, or alternatively see if we can use the dynamic allocator less during initialization.\n"},"comment":{"url":"https://api.github.com/repos/cloudius-systems/osv/issues/comments/446253546","html_url":"https://github.com/cloudius-systems/osv/issues/270#issuecomment-446253546","issue_url":"https://api.github.com/repos/cloudius-systems/osv/issues/270","id":446253546,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjI1MzU0Ng==","user":{"login":"nyh","id":584227,"node_id":"MDQ6VXNlcjU4NDIyNw==","avatar_url":"https://avatars3.githubusercontent.com/u/584227?v=4","gravatar_id":"","url":"https://api.github.com/users/nyh","html_url":"https://github.com/nyh","followers_url":"https://api.github.com/users/nyh/followers","following_url":"https://api.github.com/users/nyh/following{/other_user}","gists_url":"https://api.github.com/users/nyh/gists{/gist_id}","starred_url":"https://api.github.com/users/nyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyh/subscriptions","organizations_url":"https://api.github.com/users/nyh/orgs","repos_url":"https://api.github.com/users/nyh/repos","events_url":"https://api.github.com/users/nyh/events{/privacy}","received_events_url":"https://api.github.com/users/nyh/received_events","type":"User","site_admin":false},"created_at":"2018-12-11T15:55:15Z","updated_at":"2018-12-11T15:55:15Z","author_association":"CONTRIBUTOR","body":"Committed a patch from @wkozaczuk that implements a simplistic but effective allocator for early boot. It saves much more than 0.7MB - in my tests (and in @wkozaczuk 's) a whopping 6MB are saved."}}
{"actor":{"display_login":"nyh"}}