UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMallocBinned::Private Struct Reference

Public Types

enum  { DEFAULT_BINNED_ALLOCATOR_ALIGNMENT = sizeof(FFreeMem) }
 
enum  { PAGE_SIZE_LIMIT = PLAT_PAGE_SIZE_LIMIT }
 
enum  { BINNED_ALLOC_POOL_SIZE = PLAT_BINNED_ALLOC_POOLSIZE }
 
enum  { SMALL_BLOCK_POOL_SIZE = PLAT_SMALL_BLOCK_POOL_SIZE }
 

Static Public Member Functions

static CA_NO_RETURN void OutOfMemory (uint64 Size, uint32 Alignment=0)
 
static FORCEINLINE void TrackStats (FPoolTable *Table, uint32 Size)
 
static FPoolInfoCreateIndirect (FMallocBinned &Allocator)
 
static FORCEINLINE PoolHashBucketCreateHashBuckets (const FMallocBinned &Allocator)
 
static FORCEINLINE FPoolInfoGetPoolInfo (FMallocBinned &Allocator, UPTRINT Ptr)
 
static FORCEINLINE FPoolInfoFindPoolInfo (FMallocBinned &Allocator, UPTRINT Ptr1, UPTRINT &AllocationBase)
 
static FORCEINLINE FPoolInfoFindPoolInfoInternal (FMallocBinned &Allocator, UPTRINT Ptr, uint16 &JumpOffset)
 
static FORCEINLINE PoolHashBucketCreateHashBucket (FMallocBinned &Allocator)
 
static FORCEINLINE void InitializeHashBucket (FMallocBinned &Allocator, PoolHashBucket *Bucket)
 
static PoolHashBucketAllocateHashBucket (FMallocBinned &Allocator)
 
static FPoolInfoAllocatePoolMemory (FMallocBinned &Allocator, FPoolTable *Table, uint32 PoolSize, uint16 TableIndex)
 
static FORCEINLINE FFreeMemAllocateBlockFromPool (FMallocBinned &Allocator, FPoolTable *Table, FPoolInfo *Pool, uint32 Alignment)
 
static void FreeInternal (FMallocBinned &Allocator, void *Ptr)
 
static void PushFreeLockless (FMallocBinned &Allocator, void *Ptr)
 
static void FlushPendingFrees (FMallocBinned &Allocator)
 
static FORCEINLINE void OSFree (FMallocBinned &Allocator, void *Ptr, SIZE_T Size)
 
static FORCEINLINE void SmallOSFree (FMallocBinned &Allocator, void *Ptr, SIZE_T Size)
 
static FORCEINLINE voidOSAlloc (FMallocBinned &Allocator, SIZE_T NewSize, SIZE_T &OutActualSize)
 
static FORCEINLINE voidSmallOSAlloc (FMallocBinned &Allocator, SIZE_T NewSize, SIZE_T &OutActualSize)
 
static void UpdateSlackStat (FMallocBinned &Allocator)
 

Static Public Attributes

static bool bHasInitializedStatsMetadata = false
 

Member Enumeration Documentation

◆ anonymous enum

Default alignment for binned allocator

Enumerator
DEFAULT_BINNED_ALLOCATOR_ALIGNMENT 

◆ anonymous enum

Enumerator
PAGE_SIZE_LIMIT 

◆ anonymous enum

Enumerator
BINNED_ALLOC_POOL_SIZE 

◆ anonymous enum

Enumerator
SMALL_BLOCK_POOL_SIZE 

Member Function Documentation

◆ AllocateBlockFromPool()

static FORCEINLINE FFreeMem * FMallocBinned::Private::AllocateBlockFromPool ( FMallocBinned Allocator,
FPoolTable *  Table,
FPoolInfo Pool,
uint32  Alignment 
)
inlinestatic

◆ AllocateHashBucket()

static PoolHashBucket * FMallocBinned::Private::AllocateHashBucket ( FMallocBinned Allocator)
inlinestatic

Allocates a hash bucket from the free list of hash buckets

◆ AllocatePoolMemory()

static FPoolInfo * FMallocBinned::Private::AllocatePoolMemory ( FMallocBinned Allocator,
FPoolTable *  Table,
uint32  PoolSize,
uint16  TableIndex 
)
inlinestatic

◆ CreateHashBucket()

static FORCEINLINE PoolHashBucket * FMallocBinned::Private::CreateHashBucket ( FMallocBinned Allocator)
inlinestatic

Returns a newly created and initialized PoolHashBucket for use.

◆ CreateHashBuckets()

static FORCEINLINE PoolHashBucket * FMallocBinned::Private::CreateHashBuckets ( const FMallocBinned Allocator)
inlinestatic

Initializes tables for HashBuckets if they haven't already been initialized.

◆ CreateIndirect()

static FPoolInfo * FMallocBinned::Private::CreateIndirect ( FMallocBinned Allocator)
inlinestatic

Create a 64k page of FPoolInfo structures for tracking allocations

◆ FindPoolInfo()

static FORCEINLINE FPoolInfo * FMallocBinned::Private::FindPoolInfo ( FMallocBinned Allocator,
UPTRINT  Ptr1,
UPTRINT AllocationBase 
)
inlinestatic

◆ FindPoolInfoInternal()

static FORCEINLINE FPoolInfo * FMallocBinned::Private::FindPoolInfoInternal ( FMallocBinned Allocator,
UPTRINT  Ptr,
uint16 JumpOffset 
)
inlinestatic

◆ FlushPendingFrees()

static void FMallocBinned::Private::FlushPendingFrees ( FMallocBinned Allocator)
inlinestatic

Clear and Process the list of frees to be deallocated. It's the callers responsibility to Lock AccessGuard before calling this

◆ FreeInternal()

static void FMallocBinned::Private::FreeInternal ( FMallocBinned Allocator,
void Ptr 
)
inlinestatic

Releases memory back to the system. This is not protected from multi-threaded access and it's the callers responsibility to Lock AccessGuard before calling this.

◆ GetPoolInfo()

static FORCEINLINE FPoolInfo * FMallocBinned::Private::GetPoolInfo ( FMallocBinned Allocator,
UPTRINT  Ptr 
)
inlinestatic

Gets the FPoolInfo for a memory address. If no valid info exists one is created. NOTE: This function requires a mutex across threads, but its is the callers responsibility to acquire the mutex before calling

◆ InitializeHashBucket()

static FORCEINLINE void FMallocBinned::Private::InitializeHashBucket ( FMallocBinned Allocator,
PoolHashBucket Bucket 
)
inlinestatic

Initializes bucket with valid parameters

Parameters
bucketpointer to be initialized

◆ OSAlloc()

static FORCEINLINE void * FMallocBinned::Private::OSAlloc ( FMallocBinned Allocator,
SIZE_T  NewSize,
SIZE_T OutActualSize 
)
inlinestatic

◆ OSFree()

static FORCEINLINE void FMallocBinned::Private::OSFree ( FMallocBinned Allocator,
void Ptr,
SIZE_T  Size 
)
inlinestatic

◆ OutOfMemory()

static CA_NO_RETURN void FMallocBinned::Private::OutOfMemory ( uint64  Size,
uint32  Alignment = 0 
)
inlinestatic

◆ PushFreeLockless()

static void FMallocBinned::Private::PushFreeLockless ( FMallocBinned Allocator,
void Ptr 
)
inlinestatic

◆ SmallOSAlloc()

static FORCEINLINE void * FMallocBinned::Private::SmallOSAlloc ( FMallocBinned Allocator,
SIZE_T  NewSize,
SIZE_T OutActualSize 
)
inlinestatic

◆ SmallOSFree()

static FORCEINLINE void FMallocBinned::Private::SmallOSFree ( FMallocBinned Allocator,
void Ptr,
SIZE_T  Size 
)
inlinestatic

◆ TrackStats()

static FORCEINLINE void FMallocBinned::Private::TrackStats ( FPoolTable *  Table,
uint32  Size 
)
inlinestatic

◆ UpdateSlackStat()

static void FMallocBinned::Private::UpdateSlackStat ( FMallocBinned Allocator)
inlinestatic

Member Data Documentation

◆ bHasInitializedStatsMetadata

bool FMallocBinned::Private::bHasInitializedStatsMetadata = false
static

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