|
Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
16 #ifndef BT_ALIGNED_ALLOCATOR
17 #define BT_ALIGNED_ALLOCATOR
29 #ifdef BT_DEBUG_MEMORY_ALLOCATIONS
31 int btDumpMemoryLeaks();
33 #define btAlignedAlloc(a,b) \
34 btAlignedAllocInternal(a,b,__LINE__,__FILE__)
36 #define btAlignedFree(ptr) \
37 btAlignedFreeInternal(ptr,__LINE__,__FILE__)
47 #define btAlignedAlloc(size,alignment) btAlignedAllocInternal(size,alignment)
48 #define btAlignedFree(ptr) btAlignedFreeInternal(ptr)
66 template <
typename T ,
unsigned Alignment >
79 template <
typename Other >
104 template <
typename O >
112 #endif //BT_ALIGNED_ALLOCATOR
#define btAlignedFree(ptr)
const typedef T & const_reference
void() btFreeFunc(void *memblock)
const typedef T * const_pointer
void btAlignedAllocSetCustomAligned(btAlignedAllocFunc *allocFunc, btAlignedFreeFunc *freeFunc)
If the developer has already an custom aligned allocator, then btAlignedAllocSetCustomAligned can be ...
pointer address(reference ref) const
void construct(pointer ptr, const value_type &value)
#define btAlignedAlloc(size, alignment)
const_pointer address(const_reference ref) const
btAlignedAllocator(const btAlignedAllocator< Other, Alignment > &)
The btAlignedAllocator is a portable class for aligned memory allocations.
void destroy(pointer ptr)
friend bool operator==(const self_type &, const self_type &)
void *() btAllocFunc(size_t size)
void *() btAlignedAllocFunc(size_t size, int alignment)
pointer allocate(size_type n, const_pointer *hint=0)
void btAlignedAllocSetCustom(btAllocFunc *allocFunc, btFreeFunc *freeFunc)
The developer can let all Bullet memory allocations go through a custom memory allocator,...
btAlignedAllocator< O, Alignment > other
void * btAlignedAllocInternal(size_t size, int alignment)
we probably replace this with our own aligned memory allocator so we replace _aligned_malloc and _ali...
void deallocate(pointer ptr)
void btAlignedFreeInternal(void *ptr)
btAlignedAllocator< T, Alignment > self_type
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
self_type & operator=(const btAlignedAllocator< O, Alignment > &)
void() btAlignedFreeFunc(void *memblock)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)