UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::FLinearBlockAllocator Class Reference

#include <LinearBlockAllocator.h>

Public Member Functions

 ~FLinearBlockAllocator ()
 
voidMalloc (SIZE_T Size, uint32 Alignment)
 

Friends

class UE::FLinearBlockAllocatorThreadAccessor
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~FLinearBlockAllocator()

FLinearBlockAllocator::~FLinearBlockAllocator ( )
inline

Member Function Documentation

◆ Malloc()

void * FLinearBlockAllocator::Malloc ( SIZE_T  Size,
uint32  Alignment 
)
inline

Friends And Related Symbol Documentation

◆ UE::FLinearBlockAllocatorThreadAccessor


The documentation for this class was generated from the following file: