Skip to content

Commit

Permalink
Expose memory_pool's underlying arena 'owns' method to users of memor…
Browse files Browse the repository at this point in the history
…y_pool itself'
  • Loading branch information
cohdan committed Dec 3, 2023
1 parent d54c7f1 commit cd632c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/foonathan/memory/memory_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ namespace foonathan
return arena_.get_allocator();
}

/// \returns If `ptr` is in memory owned by the underlying arena.
bool owns(const void* ptr) const noexcept
{
return arena_.owns(ptr);
}
private:
allocator_info info() const noexcept
{
Expand Down

0 comments on commit cd632c4

Please sign in to comment.