34 #define INCLXX_IN_GEANT4_MODE 1 45 #ifndef G4INCLALLOCATIONPOOL_HH 46 #define G4INCLALLOCATIONPOOL_HH 65 return static_cast<T*>(::
operator new(
sizeof(T)));
101 #define INCL_DECLARE_ALLOCATION_POOL(T) \ 103 static void *operator new(size_t ) { \ 104 ::G4INCL::AllocationPool<T> &allocator = ::G4INCL::AllocationPool<T>::getInstance(); \ 105 return allocator.getObject(); \ 107 static void operator delete(void *a, size_t ) { \ 108 ::G4INCL::AllocationPool<T> &allocator = ::G4INCL::AllocationPool<T>::getInstance(); \ 109 allocator.recycleObject(static_cast<T *>(a)); \ 112 #endif // G4INCLALLOCATIONPOOL_HH static AllocationPool & getInstance()
virtual ~AllocationPool()
std::stack< T * > theStack
static G4ThreadLocal AllocationPool * theInstance