libroot/posix: Add glue code, global caching logic, and integrate OpenBSD malloc.
* PagesAllocator: A process-global caching strategy for the allocator. It deals with allocating virtual addresses and memory, and gives us back some of the performance that's lost by having an actual decommitment strategy (which the hoard2 glue code doesn't.) It uses two SplayTrees to manage free lists, and resizes areas on allocate if they aren't next to a free chunk (which saves a lot of time for large reallocations.) There's still room for improvement here, see inline TODOs. But overall we get pretty good performance with it. * Add a TLS slot for the allocator glue to use. Right now it just puts integers in there (since thread IDs are not evenly distributed), but we could put a data structure pointer in there as well, potentially. Change-Id: I56ddb0b022a468dc04275075ed7e174b339c8ca4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8335 Reviewed-by: waddlesplash <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
b4508f498f
commit
69cb8e25ff
@@ -21,6 +21,7 @@ enum {
|
||||
TLS_ON_EXIT_THREAD_SLOT,
|
||||
TLS_USER_THREAD_SLOT,
|
||||
TLS_DYNAMIC_THREAD_VECTOR,
|
||||
TLS_MALLOC_SLOT,
|
||||
TLS_LOCALE_SLOT,
|
||||
|
||||
// Note: these entries can safely be changed between
|
||||
|
||||
Reference in New Issue
Block a user