16#ifndef BT_ALIGNED_ALLOCATOR
17#define BT_ALIGNED_ALLOCATOR
28#ifdef BT_DEBUG_MEMORY_ALLOCATIONS
30int btDumpMemoryLeaks();
32#define btAlignedAlloc(a, b) \
33 btAlignedAllocInternal(a, b, __LINE__, __FILE__)
35#define btAlignedFree(ptr) \
36 btAlignedFreeInternal(ptr, __LINE__, __FILE__)
46#define btAlignedAlloc(size, alignment) btAlignedAllocInternal(size, alignment)
47#define btAlignedFree(ptr) btAlignedFreeInternal(ptr)
64template <
typename T,
unsigned Alignment>
76 template <
typename Other>
101 template <
typename O>
106 template <
typename O>
#define btAlignedFree(ptr)
void() btFreeFunc(void *memblock)
#define btAlignedAlloc(size, alignment)
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 btAlignedAllocSetCustomAligned(btAlignedAllocFunc *allocFunc, btAlignedFreeFunc *freeFunc)
If the developer has already an custom aligned allocator, then btAlignedAllocSetCustomAligned can be ...
void *() btAllocFunc(size_t size)
void *() btAlignedAllocFunc(size_t size, int alignment)
void() btAlignedFreeFunc(void *memblock)
void btAlignedFreeInternal(void *ptr)
void btAlignedAllocSetCustom(btAllocFunc *allocFunc, btFreeFunc *freeFunc)
The developer can let all Bullet memory allocations go through a custom memory allocator,...
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
The btAlignedAllocator is a portable class for aligned memory allocations.
btAlignedAllocator< T, Alignment > self_type
pointer allocate(size_type n, const_pointer *hint=0)
const_pointer address(const_reference ref) const
void destroy(pointer ptr)
btAlignedAllocator(const btAlignedAllocator< Other, Alignment > &)
friend bool operator==(const self_type &, const self_type &)
void deallocate(pointer ptr)
self_type & operator=(const btAlignedAllocator< O, Alignment > &)
pointer address(reference ref) const
const T & const_reference
void construct(pointer ptr, const value_type &value)
btAlignedAllocator< O, Alignment > other