26 #define ALLOC_MEMORY_BASE \
27 inline void *operator new(size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT) { \
28 return PANDA_MALLOC_SINGLE(size); \
30 inline void *operator new(size_t size, void *ptr) { \
34 inline void operator delete(void *ptr) { \
35 if (ptr != nullptr) { \
36 PANDA_FREE_SINGLE(ptr); \
39 inline void operator delete(void *, void *) { \
41 inline void *operator new[](size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT) { \
42 return PANDA_MALLOC_ARRAY(size); \
44 inline void *operator new[](size_t size, void *ptr) { \
48 inline void operator delete[](void *ptr) { \
49 if (ptr != nullptr) { \
50 PANDA_FREE_ARRAY(ptr); \
53 inline void operator delete[](void *, void *) { \
This class is intended to be the base class of all objects in Panda that might be allocated and delet...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.