-
Notifications
You must be signed in to change notification settings - Fork 389
refactor(store): replace manual slice management with offset_allocator #624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- remove SliceGuard and SliceBuffer RAII classes - replace SimpleAllocator with offset_allocator::Allocator - use AllocationHandle for automatic memory management - simplify buffer allocation with single contiguous allocations - add offset_allocator implementation in new directory - update CMakeLists to include new allocator source files - add comprehensive test suite for offset_allocator Signed-off-by: Jinyang Su <[email protected]>
5401a16
to
8cf9c00
Compare
Moreover, I notice that we currently lack any dedicated C++test suite for |
Do we have some memory utilization benchmark for this allocator? |
This allocator eagerly merge released memory at deallocation time; so long as the region is entirely free, the largest contiguous span remains directly usable. There's test for this case
|
I wonder what the memory utilization ratio will be after a long series of allocation and eviction, of different size objects. Will there be many holes in the memory space that prevent memory merging and make the allocation of large-sized objects fail? |
Update the test, result is
|
This PR eliminates redundant memcpy invocations within non–zero-copy get interfaces, yielding a further leap in performance.