diff options
author | Vic Yang <victoryang@google.com> | 2018-12-02 23:46:26 -0800 |
---|---|---|
committer | Vic Yang <victoryang@google.com> | 2018-12-12 15:53:55 -0800 |
commit | 5493851e1bd92fd64bcaeee53492584564c6e7cc (patch) | |
tree | b2e7eadce5ab178aa5d53e5618bc0219d0d9bd55 /libc/tools/genversion-scripts.py | |
parent | c49776bffc92c623c0bbb9d517252bf95bf9b652 (diff) |
Reduce LinkerSmallObjectAllocator memory overhead
The current implementation of LinkerSmallObjectAllocator keeps record
of pages in a vector, which uses its own page(s). This is at least a
page overhead per LinkerSmallObjectAllocator.
This change removes the page record vector by managing the pages in a
doubly linked list.
We also fix a bug where we are actually keeping up to 2 free pages
instead of just one.
The memory used by small objects when running 'dd', before this change:
72 KB [anon:linker_alloc_small_objects]
28 KB [anon:linker_alloc_vector]
After this change:
60 KB [anon:linker_alloc_small_objects]
Test: Boot cuttlefish and check memory used by linker.
Change-Id: I3468fa4d853c78b4bc02bfb84a3531653f74fb17
Diffstat (limited to 'libc/tools/genversion-scripts.py')
0 files changed, 0 insertions, 0 deletions