|
CookMem 1.4.0
A C++ memory context / allocator
|
Classes | |
| class | Allocator |
| class | CachedArena |
| struct | CachedMemContainer |
| class | CachedMemContext |
| class | CircularList |
| class | Exception |
| class | FixedArena |
| class | MallocArena |
| class | MemArena |
| class | MemContext |
| class | MemContextProvider |
| class | MemLogger |
| class | MemPool |
| struct | MemStatistics |
| class | MmapArena |
| class | NoActionMemLogger |
| class | PtrAVLTree |
| class | PtrRBNode |
| class | RedBlackTree |
| struct | SimpleMemContainer |
| class | SimpleMemContext |
| class | StatsLogger |
| class | TLSContextProvider |
| class | TLSContextScope |
Typedefs | |
| typedef RedBlackTree< PtrRBNode > | PtrRBTree |
Enumerations | |
| enum | MemError_et { MEM_ERROR_GENERAL , MEM_ERROR_ASSERT , MEM_ERROR_DOUBLE_FREE , MEM_ERROR_PADDING } |
| enum | MemAllocType_et { MEM_ALLOC_NONE , MEM_ALLOC_SMALL , MEM_ALLOC_TREE , MEM_ALLOC_DV , MEM_ALLOC_ARENA , MEM_ALLOC_BIG , MEM_ALLOC_COUNT } |
Variables | |
| const std::size_t | ALLOCATION_ALIGNMENT = sizeof (std::size_t) * 2 |
| const std::size_t | DEFAULT_TRIM_EMPTY_SEGMENTS_INTERVAL = 4095 |
| const std::size_t | DEFAULT_IMMEDIATE_RELEASE_THRESHOLD = 256 * 1024 |
| const std::size_t | DEFAULT_MIN_SEGMENT_SIZE = 65536 |
| const std::uint8_t | DEFAULT_PADDING_SIZE = 0 |
| const std::uint8_t | MAX_PADDING_SIZE = 8 |
| const char | DEFAULT_PADDING_BYTE = (char)0xcd |
All CookMem classes, functions and constants are in this namespace.
The red-black tree used for the large chunk bins of MemPool and for CachedArena by default.
How an allocation was satisfied. StatsLogger counts allocations by type.
The type of a memory error reported by Exception.
The alignment of every pointer returned by allocate () of a memory context: twice the size of std::size_t, which is 16 bytes on 64-bit platforms and 8 bytes on 32-bit platforms. Use allocateAligned () for a larger alignment.
| const std::size_t cookmem::DEFAULT_IMMEDIATE_RELEASE_THRESHOLD = 256 * 1024 |
The default allocation size at which a freed allocation releases its own segment right away (see MemContext::setImmediateReleaseThreshold ()).
| const std::size_t cookmem::DEFAULT_MIN_SEGMENT_SIZE = 65536 |
Default minimum memory segment size.
It should be noted that this value needs to be a multiple of 16.
Default padding byte for strict bounds checking.
| const std::uint8_t cookmem::DEFAULT_PADDING_SIZE = 0 |
Default number of padding bytes checked after each allocation.
| const std::size_t cookmem::DEFAULT_TRIM_EMPTY_SEGMENTS_INTERVAL = 4095 |
The number of deallocations between automatic empty-segment trimming passes.
| const std::uint8_t cookmem::MAX_PADDING_SIZE = 8 |
Maximum number of padding bytes checked after each allocation.