![]() |
Jolt Physics
A multi core friendly Game Physics Engine
|
Allocator for a lock free hash map. More...
#include <LockFreeHashMap.h>
Public Member Functions | |
| ~LFHMAllocator () | |
| Destructor. | |
| void | Init (uint inObjectStoreSizeBytes) |
| void | Clear () |
| Clear all allocations. | |
| void | Allocate (uint32 inBlockSize, uint32 &ioBegin, uint32 &ioEnd) |
| template<class T > | |
| uint32 | ToOffset (const T *inData) const |
| Convert a pointer to an offset. | |
| template<class T > | |
| T * | FromOffset (uint32 inOffset) const |
| Convert an offset to a pointer. | |
Public Member Functions inherited from NonCopyable | |
| NonCopyable ()=default | |
| NonCopyable (const NonCopyable &)=delete | |
| void | operator= (const NonCopyable &)=delete |
Allocator for a lock free hash map.
|
inline |
Destructor.
Allocate a new block of data
| inBlockSize | Size of block to allocate (will potentially return a smaller block if memory is full). |
| ioBegin | Should be the start of the first free byte in current memory block on input, will contain the start of the first free byte in allocated block on return. |
| ioEnd | Should be the byte beyond the current memory block on input, will contain the byte beyond the allocated block on return. |
|
inline |
Clear all allocations.
Convert an offset to a pointer.
Initialize the allocator
| inObjectStoreSizeBytes | Number of bytes to reserve for all key value pairs |
Convert a pointer to an offset.