8 #ifndef Sawyer_SmallObject_H
9 #define Sawyer_SmallObject_H
11 #include <Sawyer/PoolAllocator.h>
12 #include <Sawyer/Sawyer.h>
20 #include <Sawyer/WarningsOff.h>
22 #include <Sawyer/WarningsRestore.h>
27 static void *
operator new(
size_t size) {
return allocator_.
allocate(size); }
28 static void operator delete(
void *ptr,
size_t size) { allocator_.deallocate(ptr, size); }
void * allocate(size_t size)
Allocate one object of specified size.
Name space for the entire library.
static SynchronizedPoolAllocator & poolAllocator()
Return the pool allocator for this class.
Small object allocation from memory pools.