ObjectPool.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/core/base/memory/ObjectPool.hpp"

SHARED_OBJECT_POOL

Macro to declare object pool class which uses oatpp::base::memory::PoolSharedObjectAllocator to allocate objects.

#define SHARED_OBJECT_POOL(NAME, TYPE, CHUNK_SIZE)

SHARED_OBJECT_POOL_THREAD_LOCAL

Macro to declare object pool class which uses oatpp::base::memory::ThreadLocalPoolSharedObjectAllocator to allocate objects.

#define SHARED_OBJECT_POOL_THREAD_LOCAL(NAME, TYPE, CHUNK_SIZE)

OBJECT_POOL

Macro to declare: oatpp::base::memory::MemoryPool for object, plus class-specific operators static void* operator new(std::size_t sz), static void operator delete(void* ptr, std::size_t sz), static void* operator new(std::size_t sz, void* entry), static void operator delete(void* ptr, void* entry).

#define OBJECT_POOL(POOL_NAME, TYPE, CHUNK_SIZE)

OBJECT_POOL_THREAD_LOCAL

Macro to declare: thread_local oatpp::base::memory::MemoryPool for object, plus class-specific operators static void* operator new(std::size_t sz), static void operator delete(void* ptr, std::size_t sz), static void* operator new(std::size_t sz, void* entry), static void operator delete(void* ptr, void* entry).

#define OBJECT_POOL_THREAD_LOCAL(POOL_NAME, TYPE, CHUNK_SIZE)