Closed mrjbom closed 3 hours ago
The crate API makes no guarantees as to the internal layout of the hash table: we are free to change the size/layout of the allocation in future releases.
However if you pin to a specific hashbrown version then you could look at the layout algorithm in src/raw/mod.rs to predict what allocation sizes will be requested for different capacities.
Is there any way to achieve predictable sizes of allocations that a hashtable can request? I'm in a no_std environment and I don't have the ability to allocate memory of arbitrary size. I can create a set of caches of a certain size, but I need to be able to define these sizes, how can I achieve this?