#include <SmallObj.h>
Inheritance diagram for Loki::AllocatorSingleton< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >:
Public Types | |
typedef AllocatorSingleton< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy > | MyAllocator |
Defines type of allocator. | |
typedef ThreadingModel< MyAllocator, MutexPolicy > | MyThreadingModel |
Defines type for thread-safety locking mechanism. | |
typedef Loki::SingletonHolder< MyAllocator, Loki::CreateStatic, LifetimePolicy, ThreadingModel > | MyAllocatorSingleton |
Defines singleton made from allocator. | |
Public Member Functions | |
AllocatorSingleton () | |
The default constructor is not meant to be called directly. | |
~AllocatorSingleton (void) | |
The destructor is not meant to be called directly. | |
Static Public Member Functions | |
static AllocatorSingleton & | Instance (void) |
Returns reference to the singleton. | |
static void | ClearExtraMemory (void) |
static bool | IsCorrupted (void) |
Definition at line 222 of file SmallObj.h.
void Loki::AllocatorSingleton< T, C, M, O, L, X >::ClearExtraMemory | ( | void | ) | [static] |
Clears any excess memory used by the allocator. Complexity is O(F + C) where F is the count of FixedAllocator's in the pool, and C is the number of Chunks in all FixedAllocator's. This never throws.
Definition at line 287 of file SmallObj.h.
References Loki::AllocatorSingleton< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >::Instance(), and Loki::SmallObjAllocator::TrimExcessMemory().
Here is the call graph for this function:
bool Loki::AllocatorSingleton< T, C, M, O, L, X >::IsCorrupted | ( | void | ) | [static] |
Returns true if anything in implementation is corrupt. Complexity is O(F + C + B) where F is the count of FixedAllocator's in the pool, C is the number of Chunks in all FixedAllocator's, and B is the number of blocks in all Chunks. If it determines any data is corrupted, this will return true in release version, but assert in debug version at the line where it detects the corrupted data. If it does not detect any corrupted data, it returns false.
Definition at line 303 of file SmallObj.h.
References Loki::AllocatorSingleton< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >::Instance(), and Loki::SmallObjAllocator::IsCorrupt().
Here is the call graph for this function: