28 #ifndef GUM_SMALL_OBJECT_ALLOCATOR_H 29 #define GUM_SMALL_OBJECT_ALLOCATOR_H 112 void*
allocate(
const size_t& objectSize);
120 void deallocate(
void* pDeallocatedObject,
const size_t& objectSize);
129 <<
" - Nb Small Deallocation : " 159 #define SOA_ALLOCATE(x) SmallObjectAllocator::instance().allocate(x) 160 #define SOA_DEALLOCATE(x, y) SmallObjectAllocator::instance().deallocate(x, y) 162 #ifndef GUM_NO_INLINE 166 #endif // GUM_SMALL_OBJECT_ALLOCATOR_H SmallObjectAllocator & operator=(const SmallObjectAllocator &)
Operator = (does nothing since we use a Singleton)
Inlines of gum::SmallObjectAllocator.
static const size_t GUM_DEFAULT_MAX_OBJECT_SIZE
static const size_t GUM_DEFAULT_CHUNK_SIZE
gum is the global namespace for all aGrUM entities
HashTable< Size, FixedAllocator *> __Pool
The pool containing FixedAllocator.
virtual ~SmallObjectAllocator()
Destructor.
SmallObjectAllocator(const SmallObjectAllocator &)
Copy Constructor (does nothing since we use a Singleton)
<agrum/core/smallObjectAllocator.h>
void displayStats()
Displays the number of allocation and deallocation made so far.
void deallocate(void *pDeallocatedObject, const size_t &objectSize)
Deallocates an object.
std::size_t __maxObjectSize
The maximal size of an object befor new is called.
Size Idx
Type for indexes.
void * allocate(const size_t &objectSize)
Allocates a block.
static SmallObjectAllocator & instance()
std::size_t __chunkSize
The memory that a chunk allocates.
Headers of gum::FixedAllocator.
SmallObjectAllocator()
Constructor.
Class hash tables iterators.