Declaration of memory manager for allocating small pieces of memory. More...
#include <ogdf/basic/basic.h>#include <ogdf/basic/memory/MallocMemoryAllocator.h>#include <ogdf/basic/memory/PoolMemoryAllocator.h>#include <cstddef>Go to the source code of this file.
Classes | |
| struct | ogdf::OGDFAllocator< T > |
| Encapsulates OGDF_ALLOCATOR in a class that can be used as the Allocator for containers of the C++ standard library. More... | |
Namespaces | |
| namespace | ogdf |
| The namespace for all OGDF objects. | |
Macros | |
Managing memory | |
| #define | OGDF_ALLOCATOR ogdf::PoolMemoryAllocator |
| The used memory manager. | |
| #define | OGDF_MALLOC_NEW_DELETE OGDF_MM(ogdf::MallocMemoryAllocator) |
| Makes the class use malloc for memory allocation. | |
| #define | OGDF_MM(Alloc) |
| Creates new and delete operators in a class using the given memory allocator. | |
| #define | OGDF_NEW_DELETE OGDF_MM(OGDF_ALLOCATOR) |
| Makes the class use OGDF's memory allocator. | |
Declaration of memory manager for allocating small pieces of memory.
Definition in file memory.h.
| #define OGDF_ALLOCATOR ogdf::PoolMemoryAllocator |
| #define OGDF_MM | ( | Alloc | ) |
Creates new and delete operators in a class using the given memory allocator.
In other words, adding this macro in a class declaration makes that class managed by the respective memory manager. Throws an ogdf::InsufficientMemoryException if no more memory is available.