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

#include <LinearBlockAllocator.h>

Public Member Functions

 FLinearBlockAllocatorThreadAccessor (FLinearBlockAllocator &InAllocator)
 
 ~FLinearBlockAllocatorThreadAccessor ()
 
voidMalloc (SIZE_T Size, uint32 Alignment)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FLinearBlockAllocatorThreadAccessor()

UE::FLinearBlockAllocatorThreadAccessor::FLinearBlockAllocatorThreadAccessor ( FLinearBlockAllocator InAllocator)
inlineexplicit

◆ ~FLinearBlockAllocatorThreadAccessor()

UE::FLinearBlockAllocatorThreadAccessor::~FLinearBlockAllocatorThreadAccessor ( )
inline

Member Function Documentation

◆ Malloc()

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

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