14 #ifndef DELETEDBUFFERCHAIN_H 15 #define DELETEDBUFFERCHAIN_H 36 #define USE_DELETEDCHAINFLAG 1 39 #ifdef USE_DELETEDCHAINFLAG 40 enum DeletedChainFlag {
41 DCF_deleted = 0xfeedba0f,
42 DCF_alive = 0x12487654,
63 void *allocate(
size_t size,
TypeHandle type_handle);
64 void deallocate(
void *ptr,
TypeHandle type_handle);
66 INLINE
bool validate(
void *ptr);
67 INLINE
size_t get_buffer_size()
const;
72 #ifdef USE_DELETEDCHAINFLAG 76 TVOLATILE AtomicAdjust::Integer _flag;
86 static INLINE
void *node_to_buffer(ObjectNode *node);
87 static INLINE ObjectNode *buffer_to_node(
void *buffer);
89 ObjectNode *_deleted_chain;
94 #ifndef USE_DELETEDCHAINFLAG 96 static const size_t flag_reserved_bytes = 0;
100 static const size_t flag_reserved_bytes =
sizeof(AtomicAdjust::Integer);
101 #endif // USE_DELETEDCHAINFLAG PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class provides a wrapper around the various possible malloc schemes Panda might employ.
A fake mutex implementation for single-threaded applications that don't need any synchronization cont...
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This template class can be used to provide faster allocation/deallocation for many Panda objects.