FMallocBinned

Malloc binned allocator specific stats. Optimized virtual memory allocator.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/HAL/MallocBinned.h

Include

#include "HAL/MallocBinned.h"

Syntax

class FMallocBinned : public FMalloc

Remarks

Malloc binned allocator specific stats. Optimized virtual memory allocator.

Constructors

Name Description

Public function

FMallocBinned

(
    uint32 InPageSize,
    uint64 AddressLimit
)

InPageSize - First parameter is page size, all allocs from BinnedAllocFromOS() MUST be aligned to this size AddressLimit - Second parameter is estimate of the range of addresses expected to be returns by BinnedAllocFromOS().

Destructors

Name Description

Public function Virtual

~FMallocBinned()

Overridden from FMalloc

Name Description

Public function Virtual

void

 

DumpAllocatorStats

(
    FOutputDevice& Ar
)

Dumps allocator stats to an output device. Subclasses should override to add additional info

Public function Virtual

void

 

Free

(
    void* Ptr
)

Free

Public function Virtual

bool

 

GetAllocationSize

(
    void* Original,
    SIZE_T& SizeOut
)

If possible determine the size of the memory allocated at the given address

Public function Virtual

void

 

GetAllocatorStats

(
    FGenericMemoryStats& out_Stats
)

Writes allocator stats from the last update into the specified destination.

Public function Virtual

const TCHAR ...

 

GetDescriptiveName()

Gets descriptive name for logging purposes.

Public function Virtual

void

 

InitializeStatsMetadata()

Initializes stats metadata.

Public function Virtual Const

bool

 

IsInternallyThreadSafe()

Returns if the allocator is guaranteed to be thread-safe and therefore doesn't need a unnecessary thread-safety wrapper around it.

Public function Virtual

void *

 

Malloc

(
    SIZE_T Size,
    uint32 Alignment
)

Malloc

Public function Virtual

SIZE_T

 

QuantizeSize

(
    SIZE_T Count,
    uint32 Alignment
)

For some allocators this will return the actual size that should be requested to eliminate internal fragmentation.

Public function Virtual

void *

 

Realloc

(
    void* Ptr,
    SIZE_T NewSize,
    uint32 Alignment
)

Realloc

Public function Virtual

void

 

UpdateStats()

Called once per frame, gathers and sets all memory allocator statistics into the corresponding stats.

Public function Virtual

bool

 

ValidateHeap()

Validates the allocator's heap

Classes

Name

Description

Public struct

FFreeMem

Information about a piece of free memory. 8 bytes

Public struct

FPoolInfo

Public struct

PoolHashBucket

Hash table struct for retrieving allocation book keeping information

Public struct

Private

Constants

Name

Description

EXTENDED_PAGE_POOL_ALLOCATION_COUNT

Maximum allocation for the pooled allocator

MAX_POOLED_ALLOCATION_SIZE

POOL_COUNT

Counts.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss