Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FMallocFrameProfiler Class Referencefinal

#include <MallocFrameProfiler.h>

+ Inheritance diagram for FMallocFrameProfiler:
+ Collaboration diagram for FMallocFrameProfiler:

Classes

struct  FCallStackStats
 

Public Member Functions

 FMallocFrameProfiler (FMalloc *InMalloc)
 
virtual void Init () override
 
virtual bool Exec (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar) override
 
virtual void UpdateStats () override
 
- Public Member Functions inherited from FMallocCallstackHandler
 FMallocCallstackHandler (FMalloc *InMalloc)
 
virtual voidMalloc (SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT) override
 
virtual voidRealloc (void *Original, SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT) override
 
virtual void Free (void *Original) override
 
virtual SIZE_T QuantizeSize (SIZE_T Count, uint32 Alignment) override
 
virtual bool GetAllocationSize (void *Original, SIZE_T &SizeOut) override
 
virtual void Trim (bool bTrimThreadCaches) override
 
virtual void SetupTLSCachesOnCurrentThread () override
 
virtual void ClearAndDisableTLSCachesOnCurrentThread () override
 
virtual void InitializeStatsMetadata () override
 
virtual void GetAllocatorStats (FGenericMemoryStats &out_Stats) override
 
virtual void DumpAllocatorStats (class FOutputDevice &Ar) override
 
virtual bool IsInternallyThreadSafe () const override
 
virtual bool ValidateHeap () override
 
virtual const TCHAR * GetDescriptiveName () override
 
virtual void OnMallocInitialized () override
 
virtual void OnPreFork () override
 
virtual void OnPostFork () override
 
void DumpStackTraceToLog (int32 StackIndex)
 
- Public Member Functions inherited from FMalloc
virtual voidTryMalloc (SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT)
 
virtual voidTryRealloc (void *Original, SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT)
 
- Public Member Functions inherited from FUseSystemMallocForNew
voidoperator new (size_t Size)
 
void operator delete (void *Ptr)
 
voidoperator new[] (size_t Size)
 
void operator delete[] (void *Ptr)
 
- Public Member Functions inherited from FExec
virtual ~FExec ()
 

Static Public Member Functions

static FMallocOverrideIfEnabled (FMalloc *InUsedAlloc)
 

Protected Member Functions

virtual bool IsDisabled () override
 
virtual void TrackMalloc (void *Ptr, uint32 Size, int32 CallStackIndex)
 
virtual void TrackFree (void *Ptr, uint32 OldSize, int32 CallStackIndex)
 
virtual void TrackRealloc (void *OldPtr, void *NewPtr, uint32 NewSize, uint32 OldSize, int32 CallStackIndex)
 
- Protected Member Functions inherited from FMallocCallstackHandler
FORCEINLINE void IncDisabled ()
 
FORCEINLINE void DecDisabled ()
 
virtual int32 GetCallStackIndex ()
 
- Protected Member Functions inherited from FExec
virtual bool Exec_Dev (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 
virtual bool Exec_Editor (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 

Protected Attributes

bool bEnabled
 
uint32 FrameCount
 
uint32 EntriesToOutput
 
TMap< void *, int32TrackedCurrentAllocations
 
TArray< FCallStackStatsCallStackStatsArray
 
- Protected Attributes inherited from FMallocCallstackHandler
FMallocUsedMalloc
 
bool Initialized
 
FCriticalSection CriticalSection
 
uint32 DisabledTLS
 
FRWLock RWLock
 
TMap< FCallStackMapKey, int32CallStackMapKeyToCallStackIndexMap
 
TArray< FCallStackInfoCallStackInfoArray
 

Additional Inherited Members

- Static Public Attributes inherited from FMallocCallstackHandler
static constexpr SIZE_T MaxCallStackDepth = 64
 
static constexpr SIZE_T CallStackEntriesToSkipCount = 2
 
- Static Public Attributes inherited from FMalloc
static TAtomic< uint64MaxSingleAlloc
 

Detailed Description

Definition at line 14 of file MallocFrameProfiler.h.

Constructor & Destructor Documentation

◆ FMallocFrameProfiler()

FMallocFrameProfiler::FMallocFrameProfiler ( FMalloc * InMalloc)

Member Function Documentation

◆ Exec()

virtual bool FMallocFrameProfiler::Exec ( UWorld * InWorld,
const TCHAR * Cmd,
FOutputDevice & Ar )
overridevirtual

Handles any commands passed in on the command line

Reimplemented from FExec.

◆ Init()

virtual void FMallocFrameProfiler::Init ( )
overridevirtual

Reimplemented from FMallocCallstackHandler.

◆ IsDisabled()

virtual bool FMallocFrameProfiler::IsDisabled ( )
overrideprotectedvirtual

Reimplemented from FMallocCallstackHandler.

◆ OverrideIfEnabled()

static FMalloc * FMallocFrameProfiler::OverrideIfEnabled ( FMalloc * InUsedAlloc)
static

◆ TrackFree()

virtual void FMallocFrameProfiler::TrackFree ( void * Ptr,
uint32 OldSize,
int32 CallStackIndex )
protectedvirtual

◆ TrackMalloc()

virtual void FMallocFrameProfiler::TrackMalloc ( void * Ptr,
uint32 Size,
int32 CallStackIndex )
protectedvirtual

◆ TrackRealloc()

virtual void FMallocFrameProfiler::TrackRealloc ( void * OldPtr,
void * NewPtr,
uint32 NewSize,
uint32 OldSize,
int32 CallStackIndex )
protectedvirtual

Reimplemented from FMallocCallstackHandler.

◆ UpdateStats()

virtual void FMallocFrameProfiler::UpdateStats ( )
overridevirtual

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

Reimplemented from FMallocCallstackHandler.

Member Data Documentation

◆ bEnabled

bool FMallocFrameProfiler::bEnabled
protected

Definition at line 41 of file MallocFrameProfiler.h.

◆ CallStackStatsArray

TArray<FCallStackStats> FMallocFrameProfiler::CallStackStatsArray
protected

Definition at line 56 of file MallocFrameProfiler.h.

◆ EntriesToOutput

uint32 FMallocFrameProfiler::EntriesToOutput
protected

Definition at line 43 of file MallocFrameProfiler.h.

◆ FrameCount

uint32 FMallocFrameProfiler::FrameCount
protected

Definition at line 42 of file MallocFrameProfiler.h.

◆ TrackedCurrentAllocations

TMap<void*, int32> FMallocFrameProfiler::TrackedCurrentAllocations
protected

Definition at line 55 of file MallocFrameProfiler.h.


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