Commit de69660b authored by Vic Yang's avatar Vic Yang
Browse files

Fix free pages count in LinkerSmallObjectAllocator

Free pages count should be incremented by 1 when a new page is
allocated.  Without this fix, free pages count underflows and the
allocator ends up freeing a free page whenever the last object in that
page is freed.  In other words, it doesn't hold onto a free page as
expected and thus we may see more mmap/munmap calls.

Test: Set breakpoint at the end of __linker_init and check
      free_pages_cnt values are either 0 or 1.

Change-Id: I259a3a27329aab6835c21b4aa7ddda89dac9655b
parent 0ff8df5f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment