Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Experimental
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Experimental/ConcurrentLinearAllocator.h |
| Include | #include "Experimental/ConcurrentLinearAllocator.h" |
Syntax
template<typename BlockAllocationTag>
class TConcurrentLinearAllocator
Remarks
This concurrent fast linear Allocator can be used for temporary allocations that are usually produced and consumed on different threads and within the lifetime of a frame. Although the lifetime of any individual Allocation is not hard tied to a frame (tracking is done using the FBlockHeader::NumAllocations atomic variable) the Application will eventually run OOM if Allocations are not cleaned up in a timely manner. THere is a fastpath version of the allocator that skips Allocationheaders by aligning the BlockHeader with the Blocksize so that it easily can be found by AligingDOwn the Adress of the Allocation itself. The Allocator works by allocating a larger block in TLS which has a Header at the front which contains the Atomic and all allocations are than allocated from this block: | FBlockHeader(atomic counter etc.) | Alignment Waste | FAllocationHeader(size, optional) | Memory used for Allocation | Alignment Waste | FAllocationHeader(size, optional) | Memory used for Allocation | FreeSpace ...
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Free
(
void* Pointer |
||
| SIZE_T | GetAllocationSize
(
void* Pointer |
||
| void * | Malloc () |
||
| void * | Malloc
(
SIZE_T Size |
||
| void * | Malloc
(
SIZE_T Size, |
||
| void * | Realloc
(
void* Old, |
Constants
| Name | Description |
|---|---|
| SupportsFastPath |