Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FGrowableMallocChunk Class Referenceabstract

#include <GenericGrowableAllocator.h>

+ Inheritance diagram for FGrowableMallocChunk:
+ Collaboration diagram for FGrowableMallocChunk:

Classes

class  FFreeEntry
 

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
 
FFreeEntryFreeList
 
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
 

Detailed Description

Definition at line 77 of file GenericGrowableAllocator.h.

Constructor & Destructor Documentation

◆ FGrowableMallocChunk()

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

Constructor

Definition at line 133 of file GenericGrowableAllocator.h.

◆ ~FGrowableMallocChunk()

virtual FGrowableMallocChunk::~FGrowableMallocChunk ( )
inlinevirtual

Destructor

Definition at line 154 of file GenericGrowableAllocator.h.

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

Definition at line 170 of file GenericGrowableAllocator.h.

+ Here is the call graph for this function:

◆ 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)
+ Here is the caller graph for this function:

◆ Destroy()

void FGrowableMallocChunk::Destroy ( )
inline

Definition at line 158 of file GenericGrowableAllocator.h.

+ Here is the call graph for this function:

◆ DestroyAllocationStruct()

virtual void FGrowableMallocChunk::DestroyAllocationStruct ( FGrowableAllocationBase * Allocation)
inlinevirtual

Destroys the implemtnation object. By default, just deletes it

Definition at line 108 of file GenericGrowableAllocator.h.

◆ 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

+ Here is the caller graph for this function:

◆ 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

Definition at line 283 of file GenericGrowableAllocator.h.

+ Here is the call graph for this function:

◆ GetAddressForTracking()

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

◆ GetAllocationInfo()

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

Definition at line 358 of file GenericGrowableAllocator.h.

◆ Initialize()

void FGrowableMallocChunk::Initialize ( )
inline

Definition at line 142 of file GenericGrowableAllocator.h.

+ Here is the call graph for this function:

◆ 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

Definition at line 209 of file GenericGrowableAllocator.h.

◆ Malloc()

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

Definition at line 214 of file GenericGrowableAllocator.h.

+ Here is the call graph for this function:

◆ ShowFullAllocationList()

void FGrowableMallocChunk::ShowFullAllocationList ( )
inline

Definition at line 365 of file GenericGrowableAllocator.h.

Member Data Documentation

◆ CriticalSection

FCriticalSection* FGrowableMallocChunk::CriticalSection

Shared critical section

Definition at line 502 of file GenericGrowableAllocator.h.

◆ FreeList

FFreeEntry* FGrowableMallocChunk::FreeList

List of free blocks

Definition at line 499 of file GenericGrowableAllocator.h.

◆ HeapSize

uint64 FGrowableMallocChunk::HeapSize

Size of the heap

Definition at line 490 of file GenericGrowableAllocator.h.

◆ MaxFreeEntrySize

uint32 FGrowableMallocChunk::MaxFreeEntrySize

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

Definition at line 496 of file GenericGrowableAllocator.h.

◆ MaxFreeEntrySizeDirty

const uint32 FGrowableMallocChunk::MaxFreeEntrySizeDirty = 0xffffffff
static

Definition at line 504 of file GenericGrowableAllocator.h.

◆ MemoryType

uint32 FGrowableMallocChunk::MemoryType

Definition at line 487 of file GenericGrowableAllocator.h.

◆ UsedMemorySize

uint64 FGrowableMallocChunk::UsedMemorySize

Size of used memory

Definition at line 493 of file GenericGrowableAllocator.h.


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