30 #ifndef GUM_SMALL_OBJECT_ALLOCATOR_H 31 #define GUM_SMALL_OBJECT_ALLOCATOR_H 114 void*
allocate(
const size_t& objectSize);
122 void deallocate(
void* pDeallocatedObject,
const size_t& objectSize);
131 <<
" - Nb Small Deallocation : " 161 #define SOA_ALLOCATE(x) SmallObjectAllocator::instance().allocate(x) 162 #define SOA_DEALLOCATE(x, y) SmallObjectAllocator::instance().deallocate(x, y) 164 #ifndef GUM_NO_INLINE 168 #endif // GUM_SMALL_OBJECT_ALLOCATOR_H SmallObjectAllocator & operator=(const SmallObjectAllocator &)
Operator = (does nothing since we use a Singleton)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
static const size_t GUM_DEFAULT_MAX_OBJECT_SIZE
static const size_t GUM_DEFAULT_CHUNK_SIZE
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
SmallObjectAllocator()
Constructor.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.