Quantum 3
3.0.10
Represents native memory allocations and is used in many places across the engine. More...
Public Member Functions | |
| abstract void * | Alloc (int count) |
| Allocates memory from the unmanaged memory of the process. More... | |
| abstract void * | Alloc (int count, int alignment) |
| Allocates memory from the unmanaged memory of the process with a desired alignment. More... | |
| T * | Alloc< T > () |
| Allocate native memory for a specific type. More... | |
| void * | AllocAndClear (int count) |
| Allocate and clear native memory. More... | |
| void * | AllocAndClear (int count, int alignment) |
| Allocate and clear native memory. More... | |
| T * | AllocAndClear< T > () |
| Allocate and clear native memory for a specific type. More... | |
| void | Dispose () |
| Disposes the allocator and logs memory leaks in debug mode. More... | |
| void * | Expand (void *buffer, int currentSize, int newSize) |
| Expands the allocated memory to a new size by copying the old contents and freeing the old memory. More... | |
| T * | ExpandArray< T > (T *buffer, int currentSize, int newSize) |
| Expands the allocated memory of the array of the type to a new size by copying the old contents and freeing the old memory. More... | |
| abstract void | Free (void *ptr) |
| Frees memory previously allocated by this allocator. More... | |
| abstract AllocatorVTableManaged | GetManagedVTable () |
| Create a allocation operation table to be passed into native parts of the engine. More... | |
Protected Member Functions | |
| abstract void | Clear (void *dest, int count) |
| Writes the desired number zeroed bytes to the specified memory location. More... | |
Represents native memory allocations and is used in many places across the engine.
|
inline |
Disposes the allocator and logs memory leaks in debug mode.
|
pure virtual |
Frees memory previously allocated by this allocator.
| ptr | Pointer to memory allocated with Alloc. |
Implemented in Photon.Deterministic.Native.PInvokeAllocator, and Quantum.QuantumUnityNativeAllocator.
|
pure virtual |
Allocates memory from the unmanaged memory of the process.
| count | The required number of bytes in memory. |
Implemented in Photon.Deterministic.Native.PInvokeAllocator, and Quantum.QuantumUnityNativeAllocator.
|
pure virtual |
Allocates memory from the unmanaged memory of the process with a desired alignment.
| count | The required number of bytes in memory. |
| alignment | The byte alignment. |
Implemented in Photon.Deterministic.Native.PInvokeAllocator, and Quantum.QuantumUnityNativeAllocator.
|
protectedpure virtual |
Writes the desired number zeroed bytes to the specified memory location.
| dest | The destination memory. |
| count | The byte count. |
Implemented in Quantum.QuantumUnityNativeAllocator, Photon.Deterministic.Native.LIBCAllocator, and Photon.Deterministic.Native.MSVCRTAllocator.
|
inline |
Allocate and clear native memory.
| count | The required number of bytes in memory. |
|
inline |
Allocate and clear native memory.
| count | The required number of bytes in memory. |
| alignment | The byte alignment. |
|
inline |
Allocate and clear native memory for a specific type.
| T | : | unmanaged |
|
inline |
Allocate native memory for a specific type.
| T | : | unmanaged |
|
inline |
Expands the allocated memory to a new size by copying the old contents and freeing the old memory.
| buffer | The allocated memory. |
| currentSize | The current size. |
| newSize | The new size. |
|
inline |
Expands the allocated memory of the array of the type to a new size by copying the old contents and freeing the old memory.
| T | The data type. |
| buffer | The allocated memory. |
| currentSize | The current size. |
| newSize | The new size. |
| T | : | unmanaged |
|
pure virtual |
Create a allocation operation table to be passed into native parts of the engine.
Implemented in Quantum.QuantumUnityNativeAllocator, Photon.Deterministic.Native.LIBCAllocator, and Photon.Deterministic.Native.MSVCRTAllocator.