|
HAllocator
A Simple C++ Memory Allocator
|
High-level allocator interface using Red-Black tree for efficient memory management. More...

Go to the source code of this file.
Classes | |
| class | hh::halloc::Halloc< T, BlockSize, MaxNumBlocks > |
| Type-safe allocator using Red-Black tree for best-fit allocation. More... | |
| struct | hh::halloc::Halloc< T, BlockSize, MaxNumBlocks >::rebind< U > |
| Rebind allocator to allocate different type U. More... | |
Namespaces | |
| namespace | hh |
| namespace | hh::halloc |
Variables | |
| const int | DEFAULT_BLOCK_SIZE = (128 * 1024 * 1024) |
| Default block size: 128 MB. | |
| const int | DEFAULT_MAX_NUM_BLOCKS = 1 |
| Default max blocks: 1. | |
High-level allocator interface using Red-Black tree for efficient memory management.
This file defines the main Halloc allocator class, which provides a type-safe, scalable memory allocator built on BlocksContainer. It uses Red-Black trees for O(log n) best-fit allocation and supports automatic block creation.
Default configuration:
| const int DEFAULT_BLOCK_SIZE = (128 * 1024 * 1024) |
Default block size: 128 MB.
| const int DEFAULT_MAX_NUM_BLOCKS = 1 |
Default max blocks: 1.