Skip to content

Conversation

@jodyhagins
Copy link

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.

Jody Hagins added 2 commits August 28, 2025 22:39
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant