diff --git a/include/foonathan/memory/memory_pool.hpp b/include/foonathan/memory/memory_pool.hpp index d764365..a7e5961 100644 --- a/include/foonathan/memory/memory_pool.hpp +++ b/include/foonathan/memory/memory_pool.hpp @@ -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 {