memory icon indicating copy to clipboard operation
memory copied to clipboard

Fix check_allocation_size / memory_pool_collection

Open jodyhagins opened this issue 3 months ago • 0 comments

The allocation functions in the specialization of allocator_traits for memory_pool_collection check for overaligned allocations.

The comment says...

bad_allocation_size exception if \c size / \c alignment exceeds
\ref max_no    de_size() / the suitable alignment value

but the code does something very different (not sure really).

I think the intent is to make sure a properly aligned size for the allocation will fit within the buffer size, so this change applies that reasoning.

jodyhagins avatar Aug 29 '25 02:08 jodyhagins