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 41 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, |
|
|
const char * |
, |
|
|
int |
|
|
) |
| |
|
inlinestatic |
◆ allocate() [2/2]
| static void* ogdf::MallocMemoryAllocator::allocate |
( |
size_t |
nBytes | ) |
|
|
inlinestatic |
◆ checkSize()
| static constexpr bool ogdf::MallocMemoryAllocator::checkSize |
( |
size_t |
| ) |
|
|
inlinestatic |
◆ 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 69 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 77 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 |
( |
| ) |
|
|
inlinestatic |
◆ memoryInFreelist()
| static constexpr size_t ogdf::MallocMemoryAllocator::memoryInFreelist |
( |
| ) |
|
|
inlinestatic |
◆ memoryInGlobalFreeList()
| static constexpr size_t ogdf::MallocMemoryAllocator::memoryInGlobalFreeList |
( |
| ) |
|
|
inlinestatic |
◆ memoryInThreadFreeList()
| static constexpr size_t ogdf::MallocMemoryAllocator::memoryInThreadFreeList |
( |
| ) |
|
|
inlinestatic |
The documentation for this class was generated from the following file: