memory
memory copied to clipboard
Fix check_allocation_size / memory_pool_collection
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.