Jolt Physics
A multi core friendly Game Physics Engine
|
#include <LockFreeHashMap.h>
Public Member Functions | |
LFHMAllocatorContext (LFHMAllocator &inAllocator, uint32 inBlockSize) | |
Construct a new allocator context. More... | |
bool | Allocate (uint32 inSize, uint32 inAlignment, uint32 &outWriteOffset) |
Allocate data block. More... | |
Public Member Functions inherited from NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
void | operator= (const NonCopyable &)=delete |
Allocator context object for a lock free hash map that allocates a larger memory block at once and hands it out in smaller portions. This avoids contention on the atomic LFHMAllocator::mWriteOffset.
|
inline |
Construct a new allocator context.
|
inline |
Allocate data block.
inSize | Size of block to allocate. |
inAlignment | Alignment of block to allocate. |
outWriteOffset | Offset in buffer where block is located |