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

#include <MallocDoubleFreeFinder.h>

+ Inheritance diagram for FMallocDoubleFreeFinder:
+ Collaboration diagram for FMallocDoubleFreeFinder:

Classes

struct  TrackedAllocationData
 

Public Member Functions

 FMallocDoubleFreeFinder (FMalloc *InMalloc)
 
virtual bool Exec (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar) override
 
void TrackSpecial (void *Ptr)
 
virtual void Init ()
 
- 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 UpdateStats () 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 void TrackMalloc (void *Ptr, uint32 Size, int32 CallStackIndex)
 
virtual void TrackFree (void *Ptr, uint32 OldSize, int32 CallStackIndex)
 
- Protected Member Functions inherited from FMallocCallstackHandler
FORCEINLINE void IncDisabled ()
 
FORCEINLINE void DecDisabled ()
 
virtual bool IsDisabled ()
 
virtual void TrackRealloc (void *OldPtr, void *NewPtr, uint32 NewSize, uint32 OldSize, int32 CallStackIndex)
 
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

TMap< const void *const, TrackedAllocationDataTrackedCurrentAllocations
 
TMap< const void *const, TrackedAllocationDataTrackedFreeAllocations
 
- 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 13 of file MallocDoubleFreeFinder.h.

Constructor & Destructor Documentation

◆ FMallocDoubleFreeFinder()

FMallocDoubleFreeFinder::FMallocDoubleFreeFinder ( FMalloc * InMalloc)

Member Function Documentation

◆ Exec()

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

Handles any commands passed in on the command line

Reimplemented from FExec.

◆ Init()

virtual void FMallocDoubleFreeFinder::Init ( )
virtual

Reimplemented from FMallocCallstackHandler.

◆ OverrideIfEnabled()

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

◆ TrackFree()

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

◆ TrackMalloc()

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

◆ TrackSpecial()

void FMallocDoubleFreeFinder::TrackSpecial ( void * Ptr)

If you get an allocation/memory error outside of the allocator you can call this directly It will dump a callstack of the last allocator free most likely to have caused the problem to the log, if you have symbols loaded Might be useful to pass an access violation ptr to this!

Member Data Documentation

◆ TrackedCurrentAllocations

TMap<const void* const, TrackedAllocationData> FMallocDoubleFreeFinder::TrackedCurrentAllocations
protected

Definition at line 58 of file MallocDoubleFreeFinder.h.

◆ TrackedFreeAllocations

TMap<const void* const, TrackedAllocationData> FMallocDoubleFreeFinder::TrackedFreeAllocations
protected

Definition at line 59 of file MallocDoubleFreeFinder.h.


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