ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::monomem Namespace Reference

Description:

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.

Nested Namespaces:

namespace  detail
 Details of namespace alib::monomem.
 

Type Index:

struct  DbgStatistics
 
class  Snapshot
 
struct  Statistics
 
class  TLocalAllocator
 
class  TMonoAllocator
 
class  TPoolAllocator
 
class  TSharedMonoVal
 

Variable Index:

ALIB_API MonoAllocator GLOBAL_ALLOCATOR
 
ALIB_API RecursiveLock GLOBAL_ALLOCATOR_LOCK
 

Variable Details:

◆ GLOBAL_ALLOCATOR

ALIB_API MonoAllocator GLOBAL_ALLOCATOR
extern

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

ALIB_API RecursiveLock GLOBAL_ALLOCATOR_LOCK
extern

This mutex is used to protect the GLOBAL_ALLOCATOR from racing conditions in multithreaded software.
If compiler symbol 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.