75 _pool_.setKeyUniquenessPolicy(
false);
118 GUM_ASSERT(objectSize > 0);
120 std::lock_guard< std::mutex > lock(
_mutex_);
124 delete[] (
unsigned char*)pDeallocatedObject;
129 _pool_[
Size(objectSize)]->deallocate(pDeallocatedObject);
The class for generic Hash Tables.
HashTableIterator< Size, FixedAllocator * > iterator
static SmallObjectAllocator & instance()
void displayStats()
Displays the number of allocation and deallocation made so far.
SmallObjectAllocator & operator=(const SmallObjectAllocator &)
Operator = (does nothing since we use a Singleton).
static const size_t GUM_DEFAULT_CHUNK_SIZE
SmallObjectAllocator()
Constructor.
void deallocate(void *pDeallocatedObject, const size_t &objectSize)
Deallocates an object.
static const size_t GUM_DEFAULT_MAX_OBJECT_SIZE
std::size_t _maxObjectSize_
The maximal size of an object befor new is called.
virtual ~SmallObjectAllocator()
Destructor.
std::size_t _chunkSize_
The memory that a chunk allocates.
Headers of gum::FixedAllocator.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size Idx
Type for indexes.
gum is the global namespace for all aGrUM entities
Headers of gum::SmallObjectAllocator.