51#ifndef Foam_MemoryPool_H
52#define Foam_MemoryPool_H
73 static bool create(
bool verbose =
false);
79 static void destroy(
bool verbose =
false);
Optional memory management using a memory pool such as Umpire (https://github.com/LLNL/Umpire).
static void destroy(bool verbose=false)
Remove the memory pool instance (currently does nothing).
static void * try_allocate(std::size_t nbytes)
Allocate from pool (if active).
static bool is_pool(void *ptr)
Test if given pointer belongs to the pool.
static bool try_deallocate(void *ptr)
Deallocate a pointer managed by the pool.
static bool create(bool verbose=false)
Create a memory pool instance (if not already active).
static void resume() noexcept
Resume use of memory pool (if previously active).
static bool active() noexcept
True if pool is active (ie, created and not suspended).
static bool suspend() noexcept
Suspend use of memory pool (for allocation).