-
Notifications
You must be signed in to change notification settings - Fork 225
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe what you are looking for
In memory_mapping_allocator_gt
, memory is allocated in last_arena_
, the scaling code is listed below:
usearch/include/usearch/index_plugins.hpp
Line 960 in e414f46
std::size_t new_cap = (std::max)(last_capacity_, ceil2(extended_bytes)) * capacity_multiplier(); |
And memory used is not stored in allocator, instead it's calculated:
usearch/include/usearch/index_plugins.hpp
Lines 981 to 990 in e414f46
std::size_t total_allocated() const noexcept { | |
if (!last_arena_) | |
return 0; | |
std::size_t total_used = 0; | |
std::size_t last_capacity = last_capacity_; | |
do { | |
total_used += last_capacity; | |
last_capacity /= capacity_multiplier(); | |
} while (last_capacity >= min_capacity()); | |
return total_used; |
Since memory scaling is not simply * 2
Can you contribute to the implementation?
- I can contribute
Is your feature request specific to a certain interface?
It applies to everything
Contact Details
Is there an existing issue for this?
- I have searched the existing issues
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request