5#include "Containers/Array.h"
6#include "Containers/Map.h"
8#include "HAL/CriticalSection.h"
9#include "HAL/MemoryBase.h"
10#include "HAL/PlatformTLS.h"
21
22
26
27
31
32
33 virtual void Free(
void* Original)
override;
36
37
38
39
40
41 virtual SIZE_T
QuantizeSize(SIZE_T Count, uint32 Alignment)
override
47
48
49
50
51
52
59
60
61 virtual void Trim(
bool bTrimThreadCaches)
override
67
68
75
76
83
84
85
110
111
112
119
120
127
128
129
130
169 CRC = FCrc::MemCrc32(InCallStack, MaxCallStackDepth *
sizeof(uint64));
228 virtual void TrackRealloc(
void* OldPtr,
void* NewPtr, uint32 NewSize, uint32 OldSize, int32 CallStackIndex);
229 virtual void TrackMalloc(
void* Ptr, uint32 Size, int32 CallStackIndex) = 0;
230 virtual void TrackFree(
void* Ptr, uint32 OldSize, int32 CallStackIndex) = 0;
243
244
245
FMallocCallstackHandler * GMallocCallstackHandler
FWindowsCriticalSection FCriticalSection
virtual void * Realloc(void *Original, SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT) override
virtual void Free(void *Original) override
static constexpr SIZE_T MaxCallStackDepth
virtual void InitializeStatsMetadata() override
FMallocCallstackHandler(FMalloc *InMalloc)
virtual void * Malloc(SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT) override
virtual bool ValidateHeap() override
virtual bool GetAllocationSize(void *Original, SIZE_T &SizeOut) override
virtual void TrackRealloc(void *OldPtr, void *NewPtr, uint32 NewSize, uint32 OldSize, int32 CallStackIndex)
virtual void TrackFree(void *Ptr, uint32 OldSize, int32 CallStackIndex)=0
virtual void SetupTLSCachesOnCurrentThread() override
virtual void OnMallocInitialized() override
virtual void UpdateStats() override
FCriticalSection CriticalSection
virtual void GetAllocatorStats(FGenericMemoryStats &out_Stats) override
virtual int32 GetCallStackIndex()
void DumpStackTraceToLog(int32 StackIndex)
virtual void ClearAndDisableTLSCachesOnCurrentThread() override
virtual void OnPostFork() override
virtual void Trim(bool bTrimThreadCaches) override
virtual void DumpAllocatorStats(class FOutputDevice &Ar) override
TMap< FCallStackMapKey, int32 > CallStackMapKeyToCallStackIndexMap
static constexpr SIZE_T CallStackEntriesToSkipCount
virtual bool IsInternallyThreadSafe() const override
FORCEINLINE void DecDisabled()
virtual void OnPreFork() override
FORCEINLINE void IncDisabled()
virtual bool IsDisabled()
virtual void TrackMalloc(void *Ptr, uint32 Size, int32 CallStackIndex)=0
virtual SIZE_T QuantizeSize(SIZE_T Count, uint32 Alignment) override
virtual const TCHAR * GetDescriptiveName() override
TArray< FCallStackInfo > CallStackInfoArray
virtual const TCHAR * GetDescriptiveName()
virtual void UpdateStats()
virtual void OnMallocInitialized()
virtual bool GetAllocationSize(void *Original, SIZE_T &SizeOut)
virtual bool ValidateHeap()
virtual void SetupTLSCachesOnCurrentThread()
virtual void GetAllocatorStats(FGenericMemoryStats &out_Stats)
virtual void DumpAllocatorStats(class FOutputDevice &Ar)
virtual void Trim(bool bTrimThreadCaches)
virtual void OnPostFork()
virtual void InitializeStatsMetadata()
virtual void ClearAndDisableTLSCachesOnCurrentThread()
virtual SIZE_T QuantizeSize(SIZE_T Count, uint32 Alignment)
FScopeDisableMallocCallstackHandler()
~FScopeDisableMallocCallstackHandler()
uint64 FramePointers[MaxCallStackDepth]
friend bool operator==(const FCallStackMapKey &A, const FCallStackMapKey &B)
FCallStackMapKey(uint64 *InCallStack)
friend uint32 GetTypeHash(const FCallStackMapKey &InKey)