UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FGrowableMallocChunk Class Referenceabstract

#include <GenericGrowableAllocator.h>

+ Inheritance diagram for FGrowableMallocChunk:

Public Member Functions

virtual uint64 CreateInternalMemory (uint64 Size)=0
 
virtual void DestroyInternalMemory ()=0
 
virtual FGrowableAllocationBaseCreateAllocationStruct ()=0
 
virtual void DestroyAllocationStruct (FGrowableAllocationBase *Allocation)
 
virtual void InitializeAllocationStruct (FGrowableAllocationBase *Allocation)=0
 
virtual bool DoesChunkContainAllocation (const FGrowableAllocationBase *Allocation)=0
 
virtual bool DoesChunkContainAddress (const void *Address)=0
 
 FGrowableMallocChunk (uint64 InSize, uint32 Type, FCriticalSection *InCriticalSection)
 
void Initialize ()
 
virtual ~FGrowableMallocChunk ()
 
void Destroy ()
 
bool CanFitEntry (uint32 Size, uint32 Alignment)
 
bool IsEmpty ()
 
FGrowableAllocationBaseMalloc (uint32 Size, uint32 Alignment, uint32 MinAllocationSize, int32 OwnerType)
 
bool Free (FGrowableAllocationBase *Memory)
 
void GetAllocationInfo (uint64 &Used, uint64 &Free)
 
void ShowFullAllocationList ()
 
virtual voidGetAddressForTracking (uint32 Offset)=0
 
- Public Member Functions inherited from FGrowableMallocBase
 FGrowableMallocBase ()
 
virtual ~FGrowableMallocBase ()
 
virtual uint64 GetWasteApproximation ()
 

Public Attributes

uint32 MemoryType
 
uint64 HeapSize
 
uint64 UsedMemorySize
 
uint32 MaxFreeEntrySize
 
FFreeEntry * FreeList
 
FCriticalSectionCriticalSection
 

Static Public Attributes

static const uint32 MaxFreeEntrySizeDirty = 0xffffffff
 

Additional Inherited Members

- Protected Attributes inherited from FGrowableMallocBase
uint64 TotalAllocated
 
uint64 TotalWaste
 
uint64 CurrentAllocs
 
uint64 TotalAllocs
 

Constructor & Destructor Documentation

◆ FGrowableMallocChunk()

FGrowableMallocChunk::FGrowableMallocChunk ( uint64  InSize,
uint32  Type,
FCriticalSection InCriticalSection 
)
inline

Constructor

◆ ~FGrowableMallocChunk()

virtual FGrowableMallocChunk::~FGrowableMallocChunk ( )
inlinevirtual

Destructor

Member Function Documentation

◆ CanFitEntry()

bool FGrowableMallocChunk::CanFitEntry ( uint32  Size,
uint32  Alignment 
)
inline

Check free list for an entry big enough to fit the requested Size with Alignment

Parameters
Size- allocation size
Alignment- allocation alignment
Returns
true if available entry was found

◆ CreateAllocationStruct()

virtual FGrowableAllocationBase * FGrowableMallocChunk::CreateAllocationStruct ( )
pure virtual

Creates an implementation specific subclass of FGrowableAllocationBase. Does not need to be initialized (see InitializeAllocationStruct)

◆ CreateInternalMemory()

virtual uint64 FGrowableMallocChunk::CreateInternalMemory ( uint64  Size)
pure virtual

Lets the implementation allocate the backing memory for the chunk

Implementation needs to pause LLM tracking for ELLMTracker::Default if it's allocating from an allocator that tracks via ELLMTracker::Default

Parameters
SizeMinimum size needed for this allocation. The implementation will likely allocate more, and return that amount
Returns
The actual size of the chunk that was allocated (could be much larger than Size)

◆ Destroy()

void FGrowableMallocChunk::Destroy ( )
inline

◆ DestroyAllocationStruct()

virtual void FGrowableMallocChunk::DestroyAllocationStruct ( FGrowableAllocationBase Allocation)
inlinevirtual

Destroys the implemtnation object. By default, just deletes it

◆ DestroyInternalMemory()

virtual void FGrowableMallocChunk::DestroyInternalMemory ( )
pure virtual

Destroys the backing memory for the chunk

Implementation needs to pause LLM tracking for ELLMTracker::Default if it's allocating from an allocator that tracks via ELLMTracker::Default

◆ DoesChunkContainAddress()

virtual bool FGrowableMallocChunk::DoesChunkContainAddress ( const void Address)
pure virtual

Queries the implementation if the given address came from this chunk

◆ DoesChunkContainAllocation()

virtual bool FGrowableMallocChunk::DoesChunkContainAllocation ( const FGrowableAllocationBase Allocation)
pure virtual

Queries the implementation if the given allocation came from this chunk

◆ Free()

bool FGrowableMallocChunk::Free ( FGrowableAllocationBase Memory)
inline

◆ GetAddressForTracking()

virtual void * FGrowableMallocChunk::GetAddressForTracking ( uint32  Offset)
pure virtual

◆ GetAllocationInfo()

void FGrowableMallocChunk::GetAllocationInfo ( uint64 Used,
uint64 Free 
)
inline

◆ Initialize()

void FGrowableMallocChunk::Initialize ( )
inline

◆ InitializeAllocationStruct()

virtual void FGrowableMallocChunk::InitializeAllocationStruct ( FGrowableAllocationBase Allocation)
pure virtual

Lets the implementation fill in any specific fields of the allocation struct after the base fields are set up

◆ IsEmpty()

bool FGrowableMallocChunk::IsEmpty ( )
inline
Returns
true if this chunk has no used memory

◆ Malloc()

FGrowableAllocationBase * FGrowableMallocChunk::Malloc ( uint32  Size,
uint32  Alignment,
uint32  MinAllocationSize,
int32  OwnerType 
)
inline

◆ ShowFullAllocationList()

void FGrowableMallocChunk::ShowFullAllocationList ( )
inline

Member Data Documentation

◆ CriticalSection

FCriticalSection* FGrowableMallocChunk::CriticalSection

Shared critical section

◆ FreeList

FFreeEntry* FGrowableMallocChunk::FreeList

List of free blocks

◆ HeapSize

uint64 FGrowableMallocChunk::HeapSize

Size of the heap

◆ MaxFreeEntrySize

uint32 FGrowableMallocChunk::MaxFreeEntrySize

Size of the largest free entry (will be MaxFreeEntrySizeDirty if unknown)

◆ MaxFreeEntrySizeDirty

const uint32 FGrowableMallocChunk::MaxFreeEntrySizeDirty = 0xffffffff
static

◆ MemoryType

uint32 FGrowableMallocChunk::MemoryType

◆ UsedMemorySize

uint64 FGrowableMallocChunk::UsedMemorySize

Size of used memory


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