#
6d9329be |
| 24-May-2020 |
Michael Lotz <mmlr@mlotz.ch> |
VMUserAddressSpace: Make fAreas an AVLTree.
This is analogous to the AVLTree used for kernel address ranges in VMKernelAddressSpace. It does not use an additional DoublyLinkedList however.
Using a
VMUserAddressSpace: Make fAreas an AVLTree.
This is analogous to the AVLTree used for kernel address ranges in VMKernelAddressSpace. It does not use an additional DoublyLinkedList however.
Using a binary tree speeds up many operations that previously had to iterate the area list linearly to find normal and reserved areas, insertion start points, etc. It especially benefits LookupArea which is called for every page fault and from area_for() when randomly accessing different areas as that would make the previously used area hint (i.e. a one level lookup cache) ineffective.
The overhead of the tree versus the doubly linked list for iteration, insertion and removal is reasonably small and pales in comparison to what the linear searches previously took up.
Fixes the lookup performance in #15995.
Change-Id: I48319fe6a2e4327826e90ebca7246c7c419b5218 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2839 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
show more ...
|
#
deee8524 |
| 27-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced {malloc,memalign,free}_etc() which take an additional "flags" argument. They replace the previous special-purpose allocation functions (malloc_nogrow(), vip_io_request_malloc()). * M
* Introduced {malloc,memalign,free}_etc() which take an additional "flags" argument. They replace the previous special-purpose allocation functions (malloc_nogrow(), vip_io_request_malloc()). * Moved the I/O VIP heap to heap.cpp accordingly. * Added quite a bit of passing around of allocation flags in the VM, particularly in the VM*AddressSpace classes. * Fixed IOBuffer::GetNextVirtualVec(): It was ignoring the VIP flag and always allocated on the normal heap.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35316 a95241bf-73f2-0310-859d-f6bbb57e9c96
show more ...
|
#
2c1886ae |
| 04-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added VMArea subclasses VM{Kernel,User}Area and moved the address space list link to them. * VM{Kernel,User}AddressSpace manage the respective VMArea subclass now, and VMAddressSpace has grown
* Added VMArea subclasses VM{Kernel,User}Area and moved the address space list link to them. * VM{Kernel,User}AddressSpace manage the respective VMArea subclass now, and VMAddressSpace has grown factory methods {Create,Delete}Area.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34493 a95241bf-73f2-0310-859d-f6bbb57e9c96
show more ...
|