This ALib Module implements the concept of "monotonic allocation" by providing the central classes TMonoAllocator and TPoolAllocator.
Please consult ALib Module Memory - Programmer's Manual for further information.
◆ DbgDumpStatistics()
template<typename TAllocator>
Provides allocation statistics for manual performance optimization.
- Availability
- This method is included only in debug-compilations and when module ALib Strings is included in the ALib Build.
In case the configuration macro ALIB_DEBUG_MEMORY is set, additional information retrieved with const DbgStatistics & DbgGetStatistics() const is included in the generated string.
- Parameters
-
| ma | The allocator to get formatted statistics for. |
- Returns
- Some textual information on the allocation statistics.
◆ GLOBAL_ALLOCATOR
This is the global monotonic allocator singleton instance. It's initial size defaults to \ 128 kilobytes. This can be tweaked by performing a placement-new on this instance before bootstrapping ALib.
- See also
-
◆ GLOBAL_ALLOCATOR_LOCK
This mutex is used to protect the GLOBAL_ALLOCATOR from racing conditions in multithreaded software.
If the configuration macro ALIB_DEBUG_CRITICAL_SECTIONS is set, this lock will be attached to the DbgCriticalSections instance in GLOBAL_ALLOCATOR during bootstrap. Thus, an assertion will be raised if the GLOBAL_ALLOCATOR is used without locking this mutex.
This is a recursive lock. This allows using the high-level allocation interface with allocations, which constructs objects. These objects might recursively use the global allocator for their members.