HAllocator
A Simple C++ Memory Allocator
Loading...
Searching...
No Matches
Classes | Functions
hh::halloc Namespace Reference

Classes

class  Block
 Manages a contiguous memory block with RB-tree based allocation. More...
 
class  BlocksContainer
 Manages multiple memory blocks for scalable allocation. More...
 
class  Halloc
 Type-safe allocator using Red-Black tree for best-fit allocation. More...
 
struct  MemoryNode
 Node structure for both Red-Black tree and doubly-linked list. More...
 
class  RBTreeDriver
 Template wrapper for managing a Red-Black tree. More...
 

Functions

std::size_t get_actual_value (std::size_t value)
 Helper function to extract actual size from encoded value.
 

Function Documentation

◆ get_actual_value()

std::size_t hh::halloc::get_actual_value ( std::size_t  value)
inline

Helper function to extract actual size from encoded value.

Removes the color and status bits (bits 62-63) from the encoded value to get the actual size in bytes.

Parameters
valueEncoded value with color and status bits
Returns
Actual size in bytes (bits 0-61)