![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <LinearBlockAllocator.h>
Public Member Functions | |
| ~FLinearBlockAllocator () | |
| void * | Malloc (SIZE_T Size, uint32 Alignment) |
Friends | |
| class | UE::FLinearBlockAllocatorThreadAccessor |
Provides Malloc operation that serves memory from blocks, and does not free up memory until the allocator goes out of scope. This is an optimization to reduce the cost of Malloc and Free for dynamically allocated scratch or intermediate data.
The expected use case is to provide string allocations for FNames.
Memory for the blocks is allocated from FMemory::Malloc. Large allocations will cause wasted memory as the excess memory from the previous block goes unused.
When used directly, the allocator is not threadsafe. A high-performance threadsafe adaptor is available by using FLinearBlockAllocatorThreadAccessor, but in that case every thread using the allocator must access it only through FLinearBlockAllocatorThreadAccessor.
|
inline |
|
friend |