37#if defined (BT_HAS_ALIGNED_ALLOCATOR)
48#elif defined(__CELLOS_LV2__)
73 *((
void **)(
ret)-1) = (
void *)(
real);
107#ifdef BT_DEBUG_MEMORY_ALLOCATIONS
170int sz4prt = 4*
sizeof(
void *);
178 p.cptr-=
sizeof(
void*);
179 *p.vptrptr = (
void*)
real;
180 p.cptr-=
sizeof(
void*);
182 p.cptr-=
sizeof(
void*);
211 p.cptr-=
sizeof(
void*);
213 p.cptr-=
sizeof(
void*);
215 p.cptr-=
sizeof(
void*);
236 printf(
"free %d at address %x, from %s,line %d, size %d (total remain = %d in %d non-freed allocations)\n",
allocId,
real,
filename,
line,
size,
gTotalBytesAlignedAllocs,
diff);
static btAlignedAllocFunc * sAlignedAllocFunc
static void btAlignedFreeDefault(void *ptr)
static btAllocFunc * sAllocFunc
void * btAlignedAllocInternal(size_t size, int alignment)
we probably replace this with our own aligned memory allocator so we replace _aligned_malloc and _ali...
static void * btAlignedAllocDefault(size_t size, int alignment)
static void * btAllocDefault(size_t size)
int gTotalBytesAlignedAllocs
void btAlignedAllocSetCustomAligned(btAlignedAllocFunc *allocFunc, btAlignedFreeFunc *freeFunc)
If the developer has already an custom aligned allocator, then btAlignedAllocSetCustomAligned can be ...
static void btFreeDefault(void *ptr)
static btFreeFunc * sFreeFunc
void btAlignedFreeInternal(void *ptr)
static btAlignedFreeFunc * sAlignedFreeFunc
void btAlignedAllocSetCustom(btAllocFunc *allocFunc, btFreeFunc *freeFunc)
The developer can let all Bullet memory allocations go through a custom memory allocator,...
void * btAlignedAllocFunc(size_t size, int alignment)
void * btAllocFunc(size_t size)
void btAlignedFreeFunc(void *memblock)
void btFreeFunc(void *memblock)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const T & btMax(const T &a, const T &b)
T * btAlignPointer(T *unalignedPtr, size_t alignment)
align a pointer to the provided alignment, upwards