6#include "Misc/AssertionMacros.h"
7#include "HAL/MemoryBase.h"
8#include "HAL/UnrealMemory.h"
11#if !defined(UE_USE_MALLOC_FILL_BYTES)
16#define UE_DEBUG_FILL_FREED (0xdd
)
19#define UE_DEBUG_FILL_NEW (0xcd
)
22
23
35 checkf(UsedMalloc, TEXT(
"FMallocPoisonProxy is used without a valid malloc!"));
43 virtual void*
Malloc(SIZE_T Size, uint32 Alignment)
override
46 if (
LIKELY(Result !=
nullptr && Size > 0))
53 virtual void*
Realloc(
void* Ptr, SIZE_T NewSize, uint32 Alignment)
override
66 if (Result !=
nullptr && OldSize > 0 && OldSize < NewSize)
74 virtual void Free(
void* Ptr)
override
87 virtual SIZE_T
QuantizeSize(SIZE_T Count, uint32 Alignment)
override
132 virtual void Trim(
bool bTrimThreadCaches)
override
#define checkf(expr, format,...)
#define UE_BUILD_DEVELOPMENT
#define WITH_EDITORONLY_DATA
#define UE_DEBUG_FILL_FREED
#define UE_DEBUG_FILL_NEW
virtual const TCHAR * GetDescriptiveName()
virtual void Free(void *Original)=0
virtual void UpdateStats()
virtual void OnMallocInitialized()
virtual bool GetAllocationSize(void *Original, SIZE_T &SizeOut)
virtual void * Malloc(SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT)=0
virtual bool ValidateHeap()
virtual void SetupTLSCachesOnCurrentThread()
virtual bool IsInternallyThreadSafe() const
virtual void GetAllocatorStats(FGenericMemoryStats &out_Stats)
virtual void DumpAllocatorStats(class FOutputDevice &Ar)
virtual void Trim(bool bTrimThreadCaches)
virtual void * Realloc(void *Original, SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT)=0
virtual void OnPostFork()
virtual void InitializeStatsMetadata()
virtual void ClearAndDisableTLSCachesOnCurrentThread()
virtual SIZE_T QuantizeSize(SIZE_T Count, uint32 Alignment)
virtual void DumpAllocatorStats(class FOutputDevice &Ar) override
virtual SIZE_T QuantizeSize(SIZE_T Count, uint32 Alignment) override
virtual const TCHAR * GetDescriptiveName() override
virtual void OnPreFork() override
virtual void InitializeStatsMetadata() override
virtual bool GetAllocationSize(void *Original, SIZE_T &SizeOut) override
virtual void GetAllocatorStats(FGenericMemoryStats &out_Stats) override
virtual void * Malloc(SIZE_T Size, uint32 Alignment) override
virtual void SetupTLSCachesOnCurrentThread() override
virtual void OnMallocInitialized() override
virtual void Free(void *Ptr) override
virtual void * Realloc(void *Ptr, SIZE_T NewSize, uint32 Alignment) override
virtual void ClearAndDisableTLSCachesOnCurrentThread() override
FMallocPoisonProxy(FMalloc *InMalloc)
virtual bool Exec(UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar) override
virtual void Trim(bool bTrimThreadCaches) override
virtual bool IsInternallyThreadSafe() const override
virtual void UpdateStats() override
virtual void OnPostFork() override
virtual bool ValidateHeap() override
static FORCEINLINE void * Memset(void *Dest, uint8 Char, SIZE_T Count)