Declaration of memory manager for allocating small pieces of memory. More...
#include <windows.h>#include <stdlib.h>#include <new>#include <ogdf/internal/basic/PoolMemoryAllocator.h>#include <ogdf/internal/basic/MallocMemoryAllocator.h>Go to the source code of this file.
Classes | |
| struct | MemElem |
Namespaces | |
| namespace | ogdf |
The namespace for all OGDF objects. | |
Defines | |
| #define | WIN32_EXTRA_LEAN |
| #define | WIN32_LEAN_AND_MEAN |
| #define | NOMINMAX |
| #define | _WIN32_WINNT 0x0500 |
| #define | OGDF_MEMORY_POOL_TS |
| #define | OGDF_MM(Alloc) |
| #define | OGDF_NEW new |
| #define | OGDF_ALLOCATOR ogdf::PoolMemoryAllocator |
| #define | OGDF_NEW_DELETE OGDF_MM(OGDF_ALLOCATOR) |
| Creates new and delete operators in a class using ogdf's memory allocator. | |
| #define | OGDF_MALLOC_NEW_DELETE OGDF_MM(MallocMemoryAllocator) |
| Creates new and delete operators in a class using the malloc memory allocator. | |
Typedefs | |
| typedef MemElem * | MemElemPtr |
Declaration of memory manager for allocating small pieces of memory.
Copyright (C). All rights reserved. See README.txt in the root directory of the OGDF installation for details.
Definition in file memory.h.
| #define OGDF_ALLOCATOR ogdf::PoolMemoryAllocator |
| #define OGDF_MALLOC_NEW_DELETE OGDF_MM(MallocMemoryAllocator) |
| #define OGDF_MM | ( | Alloc | ) |
public: \ void *operator new(size_t nBytes) { \ if(OGDF_LIKELY(Alloc::checkSize(nBytes))) \ return Alloc::allocate(nBytes); \ else \ return MallocMemoryAllocator::allocate(nBytes); \ } \ void *operator new(size_t, void *p) { return p; } \ void operator delete(void *p, size_t nBytes) { \ if(OGDF_LIKELY(p != 0)) { \ if(OGDF_LIKELY(Alloc::checkSize(nBytes))) \ Alloc::deallocate(nBytes, p); \ else \ MallocMemoryAllocator::deallocate(nBytes, p); \ } \ }
| #define OGDF_NEW_DELETE OGDF_MM(OGDF_ALLOCATOR) |
| typedef MemElem* MemElemPtr |