1 #ifndef OPENDDS_DCPS_POOLALLOCATIONBASE_H 2 #define OPENDDS_DCPS_POOLALLOCATIONBASE_H 7 #define OPENDDS_POOL_ALLOCATION_HOOKS \ 8 void* operator new(size_t size) \ 10 void* const ptr = ACE_Allocator::instance()->malloc(size); \ 12 throw std::bad_alloc(); \ 17 void operator delete(void* ptr) \ 18 { ACE_Allocator::instance()->free(ptr); } \ 20 void* operator new(size_t size, const std::nothrow_t&) throw() \ 21 { return ACE_Allocator::instance()->malloc(size); } \ 23 void operator delete(void* ptr, const std::nothrow_t&) \ 24 { ACE_Allocator::instance()->free(ptr); } \ 26 void* operator new(size_t, void* ptr) { return ptr; } \ 28 void operator delete(void*, void*) {} \ 30 void* operator new[](size_t size) \ 32 void* const ptr = ACE_Allocator::instance()->malloc(size); \ 34 throw std::bad_alloc(); \ 39 void operator delete[](void* ptr) \ 40 { ACE_Allocator::instance()->free(ptr); } \ 42 void* operator new[](size_t size, const std::nothrow_t&) throw() \ 43 { return ACE_Allocator::instance()->malloc(size); } \ 45 void operator delete[](void* ptr, const std::nothrow_t&) \ 46 { ACE_Allocator::instance()->free(ptr); } \ 49 #define OPENDDS_POOL_ALLOCATION_FWD \ 50 using PoolAllocationBase::operator new; \ 51 using PoolAllocationBase::operator new[]; \ 52 using PoolAllocationBase::operator delete; \ 53 using PoolAllocationBase::operator delete[]; \ #define OPENDDS_POOL_ALLOCATION_HOOKS
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.