memory icon indicating copy to clipboard operation
memory copied to clipboard

Have use_allocate_node also check alignment

Open jodyhagins opened this issue 3 months ago • 0 comments

For the segregator, it checks the size of the allocation. However, some allocators (I'm looking at you, memory_pool_collection_allocator) throw if the requested alignment is too big. However, the segregator could have a fallback allocator that supports the larger alignment.

If we just made a hard change, this could break existing code. Thus, another parameter can be passed to the threshold constructor that can enable alignment checking. It is a strong type so there should be no inconvenient implicit conversions and in order to get the new behavior, it will have to be explicitly requested.

jodyhagins avatar Aug 29 '25 02:08 jodyhagins