![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <LinearBlockAllocator.h>
Public Member Functions | |
| FLinearBlockAllocatorThreadAccessor (FLinearBlockAllocator &InAllocator) | |
| ~FLinearBlockAllocatorThreadAccessor () | |
| void * | Malloc (SIZE_T Size, uint32 Alignment) |
Accessor for a LinearBlockAllocator when multithreading. Every thread using the Allocator must access it through its own FLinearBlockAllocatorThreadAccessor.
Intended use is to share an allocator amongst the task threads used within a single function in e.g. ParallelFor.
The lifetime of FLinearBlockAllocatorThreadAccessor must be within the lifetime of the Accessor, an assertion fires if FLinearBlockAllocatorThreadAccessor are still allocated when the Allocator is destructed. So the thread that destroys the allocator must wait on all other threads using the Allocator to destroy their FLinearBlockAllocatorThreadAccessor.
|
inlineexplicit |
|
inline |