Main Page Class List Class Members

# sdk/extensions/authoring/source/VHACD/inc/btAlignedAllocator.h File Reference

`#include "btScalar.h"`

Go to the source code of this file.

## Classes
class | btAlignedAllocator< T, Alignment >
struct | btAlignedAllocator< T, Alignment >::btAlignedAllocator::rebind< O >
## Defines
#define | btAlignedAlloc(size, alignment) btAlignedAllocInternal(size, alignment)
#define | btAlignedFree(ptr) btAlignedFreeInternal(ptr)
## Typedefs
typedef void *( | btAlignedAllocFunc )(size_t size, int32_t alignment)
typedef void( | btAlignedFreeFunc )(void *memblock)
typedef void *( | btAllocFunc )(size_t size)
typedef void( | btFreeFunc )(void *memblock)
typedef int32_t | size_type
## Functions
void * | btAlignedAllocInternal (size_t size, int32_t alignment)
void | btAlignedAllocSetCustom (btAllocFunc *allocFunc, btFreeFunc *freeFunc)
| The developer can let all Bullet memory allocations go through a custom memory allocator, using btAlignedAllocSetCustom.
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.
void | btAlignedFreeInternal (void *ptr)

## Define Documentation

#define btAlignedAlloc | ( | size,
|  | alignment |  | ) | btAlignedAllocInternal(size, alignment)

#define btAlignedFree | ( | ptr |  | ) | btAlignedFreeInternal(ptr)

## Typedef Documentation

typedef void*( btAlignedAllocFunc)(size_t size, int32_t alignment)

typedef void( btAlignedFreeFunc)(void *memblock)

typedef void*( btAllocFunc)(size_t size)

typedef void( btFreeFunc)(void *memblock)

typedef int32_t size_type

## Function Documentation

void* btAlignedAllocInternal | ( | size_t | size,
|  | int32_t | 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

void btAlignedAllocSetCustom | ( | btAllocFunc * | allocFunc,
|  | btFreeFunc * | freeFunc |
| ) |  |  |

The developer can let all Bullet memory allocations go through a custom memory allocator, using btAlignedAllocSetCustom.

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.

void btAlignedFreeInternal | ( | void * | ptr | ) |