9#ifndef JPH_DISABLE_CUSTOM_ALLOCATOR
29#define JPH_OVERRIDE_NEW_DELETE \
30 JPH_INLINE void *operator new (size_t inCount) { return JPH::Allocate(inCount); } \
31 JPH_INLINE void operator delete (void *inPointer) noexcept { JPH::Free(inPointer); } \
32 JPH_INLINE void *operator new[] (size_t inCount) { return JPH::Allocate(inCount); } \
33 JPH_INLINE void operator delete[] (void *inPointer) noexcept { JPH::Free(inPointer); } \
34 JPH_INLINE void *operator new (size_t inCount, std::align_val_t inAlignment) { return JPH::AlignedAllocate(inCount, static_cast<size_t>(inAlignment)); } \
35 JPH_INLINE void operator delete (void *inPointer, std::align_val_t inAlignment) noexcept { JPH::AlignedFree(inPointer); } \
36 JPH_INLINE void *operator new[] (size_t inCount, std::align_val_t inAlignment) { return JPH::AlignedAllocate(inCount, static_cast<size_t>(inAlignment)); } \
37 JPH_INLINE void operator delete[] (void *inPointer, std::align_val_t inAlignment) noexcept { JPH::AlignedFree(inPointer); }
43void Free(
void *inBlock);
51#define JPH_OVERRIDE_NEW_DELETE
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
void *(*)(size_t inSize, size_t inAlignment) AlignedAllocateFunction
Definition Memory.h:16
AllocateFunction Allocate
Definition Memory.cpp:57
void(*)(void *inBlock) FreeFunction
Definition Memory.h:13
void RegisterDefaultAllocator()
Register platform default allocation / free functions.
Definition Memory.cpp:62
FreeFunction Free
Definition Memory.cpp:58
AlignedFreeFunction AlignedFree
Definition Memory.cpp:60
void(*)(void *inBlock) AlignedFreeFunction
Definition Memory.h:17
AlignedAllocateFunction AlignedAllocate
Definition Memory.cpp:59
void *(*)(size_t inSize) AllocateFunction
Definition Memory.h:12