Skip to content

Commit

Permalink
Use the current block size, not the next block size for
Browse files Browse the repository at this point in the history
`memory_pool_collection::def_capacity`

Fixes #173.
  • Loading branch information
foonathan committed Dec 28, 2023
1 parent 3ab8c62 commit d989f41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/foonathan/memory/memory_pool_collection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ namespace foonathan

std::size_t def_capacity() const noexcept
{
return arena_.next_block_size() / pools_.size();
return arena_.current_block().size / pools_.size();
}

detail::fixed_memory_stack allocate_block()
Expand Down

0 comments on commit d989f41

Please sign in to comment.