Another partial rewrite of the kernel heap. There are no heap lists anymore,
there is only one heap_allocator for each heap class. Instead of adding complete allocators, individual areas can now be added to existing allocators. This removes a lot of complexity in the frontend code and avoids the previous duplications wasting resources (allocator lock, bin sizes, bin list). The pages are now managed in heap_area structures that are attached to areas. They store the page table, page free lists and local variables. The same mechanism as used for heap_pages is now used for heap_areas too, i.e. they are kept in a sorted list where the fullest but not yet completely full area is always at the top. This favors areas to become completely full and other, not as frequently used areas, to become completely empty over time so they can be freed. Full areas are removed from the list, so they do not need to be looked at/skipped when allocating new pages. Through this mechanism and as there are no allocator lists anymore that grow bigger over time, allocations should be far more scalable. Note that actually removing areas once they are not needed anymore is still not implemented, but it is now a relatively easy addition whereas previously it would have killed the whole design. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26237 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
bb956ce2ea
commit
85ebbd1318