Blender
V3.3
|
#include "btAlignedAllocator.h"
Go to the source code of this file.
Functions | |
static void * | btAllocDefault (size_t size) |
static void | btFreeDefault (void *ptr) |
static void * | btAlignedAllocDefault (size_t size, int alignment) |
static void | btAlignedFreeDefault (void *ptr) |
void | btAlignedAllocSetCustomAligned (btAlignedAllocFunc *allocFunc, btAlignedFreeFunc *freeFunc) |
If the developer has already an custom aligned allocator, then btAlignedAllocSetCustomAligned can be used. The default aligned allocator pre-allocates extra memory using the non-aligned allocator, and instruments it. More... | |
void | btAlignedAllocSetCustom (btAllocFunc *allocFunc, btFreeFunc *freeFunc) |
The developer can let all Bullet memory allocations go through a custom memory allocator, using btAlignedAllocSetCustom. More... | |
void * | btAlignedAllocInternal (size_t size, int alignment) |
void | btAlignedFreeInternal (void *ptr) |
Variables | |
static btAllocFunc * | sAllocFunc = btAllocDefault |
static btFreeFunc * | sFreeFunc = btFreeDefault |
static btAlignedAllocFunc * | sAlignedAllocFunc = btAlignedAllocDefault |
static btAlignedFreeFunc * | sAlignedFreeFunc = btAlignedFreeDefault |
|
inlinestatic |
Definition at line 62 of file btAlignedAllocator.cpp.
References btAlignPointer(), ret, sAllocFunc, and size().
Referenced by btAlignedAllocSetCustomAligned().
void* btAlignedAllocInternal | ( | size_t | size, |
int | alignment | ||
) |
we probably replace this with our own aligned memory allocator so we replace _aligned_malloc and _aligned_free with our own that is better portable and more predictable BT_DEBUG_MEMORY_ALLOCATIONS preprocessor can be set in build system for regression tests to detect memory leaks define BT_DEBUG_MEMORY_ALLOCATIONS 1
Definition at line 244 of file btAlignedAllocator.cpp.
References ptr, sAlignedAllocFunc, and size().
void btAlignedAllocSetCustom | ( | btAllocFunc * | allocFunc, |
btFreeFunc * | freeFunc | ||
) |
The developer can let all Bullet memory allocations go through a custom memory allocator, using btAlignedAllocSetCustom.
Definition at line 100 of file btAlignedAllocator.cpp.
References btAllocDefault(), btFreeDefault(), sAllocFunc, and sFreeFunc.
void btAlignedAllocSetCustomAligned | ( | btAlignedAllocFunc * | allocFunc, |
btAlignedFreeFunc * | freeFunc | ||
) |
If the developer has already an custom aligned allocator, then btAlignedAllocSetCustomAligned can be used. The default aligned allocator pre-allocates extra memory using the non-aligned allocator, and instruments it.
Definition at line 94 of file btAlignedAllocator.cpp.
References btAlignedAllocDefault(), btAlignedFreeDefault(), sAlignedAllocFunc, and sAlignedFreeFunc.
Definition at line 79 of file btAlignedAllocator.cpp.
References ptr, and sFreeFunc.
Referenced by btAlignedAllocSetCustomAligned().
Definition at line 252 of file btAlignedAllocator.cpp.
References ptr, and sAlignedFreeFunc.
|
static |
Definition at line 24 of file btAlignedAllocator.cpp.
References size().
Referenced by btAlignedAllocSetCustom().
Definition at line 29 of file btAlignedAllocator.cpp.
Referenced by btAlignedAllocSetCustom().
|
static |
Definition at line 91 of file btAlignedAllocator.cpp.
Referenced by btAlignedAllocInternal(), and btAlignedAllocSetCustomAligned().
|
static |
Definition at line 92 of file btAlignedAllocator.cpp.
Referenced by btAlignedAllocSetCustomAligned(), and btAlignedFreeInternal().
|
static |
Definition at line 34 of file btAlignedAllocator.cpp.
Referenced by btAlignedAllocDefault(), and btAlignedAllocSetCustom().
|
static |
Definition at line 35 of file btAlignedAllocator.cpp.
Referenced by btAlignedAllocSetCustom(), and btAlignedFreeDefault().