9#ifndef JPH_DISABLE_CUSTOM_ALLOCATOR
31#define JPH_OVERRIDE_NEW_DELETE \
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) { return JPH::Allocate(inCount); } \
35 JPH_INLINE void operator delete[] (void *inPointer) noexcept { JPH::Free(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, [[maybe_unused]] std::align_val_t inAlignment) noexcept { JPH::AlignedFree(inPointer); } \
38 JPH_INLINE void *operator new[] (size_t inCount, std::align_val_t inAlignment) { return JPH::AlignedAllocate(inCount, static_cast<size_t>(inAlignment)); } \
39 JPH_INLINE void operator delete[] (void *inPointer, [[maybe_unused]] std::align_val_t inAlignment) noexcept { JPH::AlignedFree(inPointer); } \
40 JPH_INLINE void *operator new ([[maybe_unused]] size_t inCount, void *inPointer) noexcept { return inPointer; } \
41 JPH_INLINE void operator delete ([[maybe_unused]] void *inPointer, [[maybe_unused]] void *inPlace) noexcept { } \
42 JPH_INLINE void *operator new[] ([[maybe_unused]] size_t inCount, void *inPointer) noexcept { return inPointer; } \
43 JPH_INLINE void operator delete[] ([[maybe_unused]] void *inPointer, [[maybe_unused]] void *inPlace) noexcept { }
58#define JPH_OVERRIDE_NEW_DELETE
#define JPH_EXPORT
Definition Core.h:271
#define JPH_NAMESPACE_END
Definition Core.h:414
#define JPH_NAMESPACE_BEGIN
Definition Core.h:408
void *(*)(void *inBlock, size_t inOldSize, size_t inNewSize) ReallocateFunction
Definition Memory.h:13
void *(*)(size_t inSize, size_t inAlignment) AlignedAllocateFunction
Definition Memory.h:17
JPH_EXPORT AlignedAllocateFunction AlignedAllocate
Definition Memory.cpp:71
void(*)(void *inBlock) FreeFunction
Definition Memory.h:14
JPH_EXPORT void RegisterDefaultAllocator()
Register platform default allocation / free functions.
Definition Memory.cpp:74
JPH_EXPORT AllocateFunction Allocate
Definition Memory.cpp:68
JPH_EXPORT ReallocateFunction Reallocate
Definition Memory.cpp:69
JPH_EXPORT AlignedFreeFunction AlignedFree
Definition Memory.cpp:72
void(*)(void *inBlock) AlignedFreeFunction
Definition Memory.h:18
void *(*)(size_t inSize) AllocateFunction
Definition Memory.h:12
JPH_EXPORT FreeFunction Free
Definition Memory.cpp:70