#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) |
void Loki::AllocatorSingleton< TM, CS, MSOS, OAS, LP, MX >::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.
bool Loki::AllocatorSingleton< TM, CS, MSOS, OAS, LP, MX >::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.