Implements a simple memory manager using malloc()
and free()
.
More...
#include <ogdf/basic/memory/MallocMemoryAllocator.h>
Implements a simple memory manager using malloc()
and free()
.
Definition at line 44 of file MallocMemoryAllocator.h.
◆ MemElemPtr
◆ MallocMemoryAllocator()
ogdf::MallocMemoryAllocator::MallocMemoryAllocator |
( |
| ) |
|
|
inline |
◆ ~MallocMemoryAllocator()
ogdf::MallocMemoryAllocator::~MallocMemoryAllocator |
( |
| ) |
|
|
inline |
◆ allocate() [1/2]
static void* ogdf::MallocMemoryAllocator::allocate |
( |
size_t |
nBytes | ) |
|
|
inlinestatic |
◆ allocate() [2/2]
static void* ogdf::MallocMemoryAllocator::allocate |
( |
size_t |
nBytes, |
|
|
const char * |
, |
|
|
int |
|
|
) |
| |
|
inlinestatic |
◆ checkSize()
static constexpr bool ogdf::MallocMemoryAllocator::checkSize |
( |
size_t |
| ) |
|
|
inlinestaticconstexpr |
◆ cleanup()
static void ogdf::MallocMemoryAllocator::cleanup |
( |
| ) |
|
|
inlinestatic |
◆ deallocate()
static void ogdf::MallocMemoryAllocator::deallocate |
( |
size_t |
, |
|
|
void * |
p |
|
) |
| |
|
inlinestatic |
Deallocates memory at address p
. We do not keep track of the size of the deallocated object.
Definition at line 72 of file MallocMemoryAllocator.h.
◆ deallocateList()
static void ogdf::MallocMemoryAllocator::deallocateList |
( |
size_t |
, |
|
|
void * |
pHead, |
|
|
void * |
pTail |
|
) |
| |
|
inlinestatic |
Deallocate a complete list starting at pHead
and ending at pTail
.
The elements are assumed to be chained using the first word of each element.
Definition at line 78 of file MallocMemoryAllocator.h.
◆ flushPool() [1/2]
static void ogdf::MallocMemoryAllocator::flushPool |
( |
| ) |
|
|
inlinestatic |
◆ flushPool() [2/2]
static void ogdf::MallocMemoryAllocator::flushPool |
( |
uint16_t |
| ) |
|
|
inlinestatic |
◆ memoryAllocatedInBlocks()
static constexpr size_t ogdf::MallocMemoryAllocator::memoryAllocatedInBlocks |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ memoryInFreelist()
static constexpr size_t ogdf::MallocMemoryAllocator::memoryInFreelist |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ memoryInGlobalFreeList()
static constexpr size_t ogdf::MallocMemoryAllocator::memoryInGlobalFreeList |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ memoryInThreadFreeList()
static constexpr size_t ogdf::MallocMemoryAllocator::memoryInThreadFreeList |
( |
| ) |
|
|
inlinestaticconstexpr |
The documentation for this class was generated from the following file: