UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MemoryTrace.h File Reference
#include "HAL/Platform.h"
#include "Misc/EnumClassFlags.h"
#include "Trace/Config.h"
#include "Trace/Trace.h"

Go to the source code of this file.

Macros

#define UE_MEMORY_TRACE_AVAILABLE   0
 
#define UE_MEMORY_TRACE_LATE_INIT   0
 
#define UE_MEMORY_TRACE_ENABLED   0
 
#define UE_MEMORY_TRACE(x)
 

Typedefs

typedef uint32 HeapId
 

Enumerations

enum  EMemoryTraceRootHeap : uint8 { SystemMemory , VideoMemory , EndHardcoded = VideoMemory , EndReserved = 15 }
 
enum class  EMemoryTraceHeapFlags : uint16 { None = 0 , Root = 1 << 0 , NeverFrees = 1 << 1 }
 
enum class  EMemoryTraceHeapAllocationFlags : uint8 { None = 0 , Heap = 1 << 0 , Swap = 2 << 0 }
 
enum class  EMemoryTraceSwapOperation : uint8 { PageOut = 0 , PageIn = 1 , FreeInSwap = 2 }
 
enum class  EMemoryTraceInit : uint8 {
  Disabled = 0 , AllocEvents = 1 << 0 , Callstacks = 1 << 1 , Tags = 1 << 2 ,
  Probing = 1 << 3 , Full = AllocEvents|Callstacks|Tags|Probing , Light = AllocEvents|Tags
}
 

Functions

 ENUM_CLASS_FLAGS (EMemoryTraceHeapFlags)
 
 ENUM_CLASS_FLAGS (EMemoryTraceHeapAllocationFlags)
 
 ENUM_CLASS_FLAGS (EMemoryTraceInit)
 
HeapId MemoryTrace_RootHeapSpec (const TCHAR *Name, EMemoryTraceHeapFlags Flags=EMemoryTraceHeapFlags::None)
 
HeapId MemoryTrace_HeapSpec (HeapId ParentId, const TCHAR *Name, EMemoryTraceHeapFlags Flags=EMemoryTraceHeapFlags::None)
 
void MemoryTrace_MarkAllocAsHeap (uint64 Address, HeapId Heap)
 
void MemoryTrace_UnmarkAllocAsHeap (uint64 Address, HeapId Heap)
 
void MemoryTrace_Alloc (uint64 Address, uint64 Size, uint32 Alignment, HeapId RootHeap=EMemoryTraceRootHeap::SystemMemory, uint32 ExternalCallstackId=0)
 
void MemoryTrace_Free (uint64 Address, HeapId RootHeap=EMemoryTraceRootHeap::SystemMemory, uint32 ExternalCallstackId=0)
 
void MemoryTrace_ReallocFree (uint64 Address, HeapId RootHeap=EMemoryTraceRootHeap::SystemMemory, uint32 ExternalCallstackId=0)
 
void MemoryTrace_ReallocAlloc (uint64 Address, uint64 NewSize, uint32 Alignment, HeapId RootHeap=EMemoryTraceRootHeap::SystemMemory, uint32 ExternalCallstackId=0)
 
void MemoryTrace_UpdateAlloc (uint64 Address, HeapId RootHeap=EMemoryTraceRootHeap::SystemMemory, uint32 ExternalCallstackId=0)
 
void MemoryTrace_SwapOp (uint64 PageAddress, EMemoryTraceSwapOperation SwapOperation, uint32 CompressedSize=0, uint32 CallstackId=0)
 
class FMallocMemoryTrace_GetAllocator ()
 

Macro Definition Documentation

◆ UE_MEMORY_TRACE

#define UE_MEMORY_TRACE (   x)

◆ UE_MEMORY_TRACE_AVAILABLE

#define UE_MEMORY_TRACE_AVAILABLE   0

◆ UE_MEMORY_TRACE_ENABLED

#define UE_MEMORY_TRACE_ENABLED   0

◆ UE_MEMORY_TRACE_LATE_INIT

#define UE_MEMORY_TRACE_LATE_INIT   0

Typedef Documentation

◆ HeapId

Enumeration Type Documentation

◆ EMemoryTraceHeapAllocationFlags

Enumerator
None 
Heap 
Swap 

◆ EMemoryTraceHeapFlags

Enumerator
None 
Root 
NeverFrees 

◆ EMemoryTraceInit

enum class EMemoryTraceInit : uint8
strong
Enumerator
Disabled 
AllocEvents 
Callstacks 
Tags 
Probing 
Full 
Light 

◆ EMemoryTraceRootHeap

Enumerator
SystemMemory 
VideoMemory 
EndHardcoded 
EndReserved 

◆ EMemoryTraceSwapOperation

Enumerator
PageOut 
PageIn 
FreeInSwap 

Function Documentation

◆ ENUM_CLASS_FLAGS() [1/3]

ENUM_CLASS_FLAGS ( EMemoryTraceHeapAllocationFlags  )

◆ ENUM_CLASS_FLAGS() [2/3]

ENUM_CLASS_FLAGS ( EMemoryTraceHeapFlags  )

◆ ENUM_CLASS_FLAGS() [3/3]

ENUM_CLASS_FLAGS ( EMemoryTraceInit  )

◆ MemoryTrace_Alloc()

void MemoryTrace_Alloc ( uint64  Address,
uint64  Size,
uint32  Alignment,
HeapId  RootHeap = EMemoryTraceRootHeap::SystemMemory,
uint32  ExternalCallstackId = 0 
)
inline

◆ MemoryTrace_Free()

void MemoryTrace_Free ( uint64  Address,
HeapId  RootHeap = EMemoryTraceRootHeap::SystemMemory,
uint32  ExternalCallstackId = 0 
)
inline

◆ MemoryTrace_GetAllocator()

class FMalloc * MemoryTrace_GetAllocator ( )
inline

◆ MemoryTrace_HeapSpec()

HeapId MemoryTrace_HeapSpec ( HeapId  ParentId,
const TCHAR Name,
EMemoryTraceHeapFlags  Flags = EMemoryTraceHeapFlags::None 
)
inline

◆ MemoryTrace_MarkAllocAsHeap()

void MemoryTrace_MarkAllocAsHeap ( uint64  Address,
HeapId  Heap 
)
inline

◆ MemoryTrace_ReallocAlloc()

void MemoryTrace_ReallocAlloc ( uint64  Address,
uint64  NewSize,
uint32  Alignment,
HeapId  RootHeap = EMemoryTraceRootHeap::SystemMemory,
uint32  ExternalCallstackId = 0 
)
inline

◆ MemoryTrace_ReallocFree()

void MemoryTrace_ReallocFree ( uint64  Address,
HeapId  RootHeap = EMemoryTraceRootHeap::SystemMemory,
uint32  ExternalCallstackId = 0 
)
inline

◆ MemoryTrace_RootHeapSpec()

HeapId MemoryTrace_RootHeapSpec ( const TCHAR Name,
EMemoryTraceHeapFlags  Flags = EMemoryTraceHeapFlags::None 
)
inline

◆ MemoryTrace_SwapOp()

void MemoryTrace_SwapOp ( uint64  PageAddress,
EMemoryTraceSwapOperation  SwapOperation,
uint32  CompressedSize = 0,
uint32  CallstackId = 0 
)
inline

◆ MemoryTrace_UnmarkAllocAsHeap()

void MemoryTrace_UnmarkAllocAsHeap ( uint64  Address,
HeapId  Heap 
)
inline

◆ MemoryTrace_UpdateAlloc()

void MemoryTrace_UpdateAlloc ( uint64  Address,
HeapId  RootHeap = EMemoryTraceRootHeap::SystemMemory,
uint32  ExternalCallstackId = 0 
)
inline