52 #define OGDF_MM(Alloc) \ 54 static void *operator new(size_t nBytes) { \ 55 if(OGDF_LIKELY(Alloc::checkSize(nBytes))) \ 56 return Alloc::allocate(nBytes); \ 58 return ogdf::MallocMemoryAllocator::allocate(nBytes); \ 61 static void operator delete(void *p, size_t nBytes) { \ 62 if(OGDF_LIKELY(p != 0)) { \ 63 if(OGDF_LIKELY(Alloc::checkSize(nBytes))) \ 64 Alloc::deallocate(nBytes, p); \ 66 ogdf::MallocMemoryAllocator::deallocate(nBytes, p); \ 69 static void *operator new(size_t, void *p) { return p; } \ 70 static void operator delete(void *, void *) { } 72 #ifdef OGDF_MEMORY_MALLOC_TS 73 #define OGDF_ALLOCATOR ogdf::MallocMemoryAllocator 75 #define OGDF_ALLOCATOR ogdf::PoolMemoryAllocator 84 #define OGDF_NEW_DELETE OGDF_MM(OGDF_ALLOCATOR) 91 #define OGDF_MALLOC_NEW_DELETE OGDF_MM(ogdf::MallocMemoryAllocator) Declaration of memory manager for allocating small pieces of memory.
Declaration of memory manager for allocating small pieces of memory.
The namespace for all OGDF objects.