Navigation
API > API/Runtime > API/Runtime/Core
| Name | FMallocCallstackHandler |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/HAL/MallocCallstackHandler.h |
| Include Path | #include "HAL/MallocCallstackHandler.h" |
Syntax
class FMallocCallstackHandler : public FMalloc
Inheritance Hierarchy
- FExec → FMalloc → FMallocCallstackHandler
- FUseSystemMallocForNew → FMalloc → FMallocCallstackHandler
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMallocCallstackHandler
(
FMalloc* InMalloc |
HAL/MallocCallstackHandler.h |
Structs
| Name | Remarks |
|---|---|
| FCallStackInfo | |
| FCallStackMapKey | Used as a key in our current allocations/freed allocations maps |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CallStackEntriesToSkipCount | SIZE_T | HAL/MallocCallstackHandler.h | |
| MaxCallStackDepth | SIZE_T | HAL/MallocCallstackHandler.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DumpStackTraceToLog
(
int32 StackIndex |
HAL/MallocCallstackHandler.h | ||
virtual void Init() |
HAL/MallocCallstackHandler.h |
Overridden from FMalloc
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ClearAndDisableTLSCachesOnCurrentThread() |
Clears the TLS caches on the current thread and disables any future caching. | HAL/MallocCallstackHandler.h | |
virtual void DumpAllocatorStats
(
FOutputDevice& Ar |
Dumps current allocator stats to the log. | HAL/MallocCallstackHandler.h | |
virtual void Free
(
void* Original |
Free | HAL/MallocCallstackHandler.h | |
virtual bool GetAllocationSize
(
void* Original, |
If possible determine the size of the memory allocated at the given address | HAL/MallocCallstackHandler.h | |
virtual void GetAllocatorStats
(
FGenericMemoryStats& out_Stats |
Writes allocator stats from the last update into the specified destination. | HAL/MallocCallstackHandler.h | |
virtual const TCHAR * GetDescriptiveName() |
Gets descriptive name for logging purposes. | HAL/MallocCallstackHandler.h | |
virtual void InitializeStatsMetadata () |
Initializes stats metadata. | HAL/MallocCallstackHandler.h | |
virtual bool IsInternallyThreadSafe() |
Returns if the allocator is guaranteed to be thread-safe and therefore doesn't need a unnecessary thread-safety wrapper around it. | HAL/MallocCallstackHandler.h | |
virtual void * Malloc
(
SIZE_T Count, |
Malloc | HAL/MallocCallstackHandler.h | |
virtual void MarkTLSCachesAsUnusedOnCurrentThread () |
Mark TLS caches for current thread as unused. | HAL/MallocCallstackHandler.h | |
virtual void MarkTLSCachesAsUsedOnCurrentThread () |
Mark TLS caches for the current thread as used. | HAL/MallocCallstackHandler.h | |
virtual void OnMallocInitialized() |
Notifies the malloc implementation that initialization of all allocators in GMalloc is complete, so it's safe to initialize any extra features that require "regular" allocations | HAL/MallocCallstackHandler.h | |
virtual void OnPostFork() |
Notifies the malloc implementation that the process has forked so we can try and avoid dirtying pre-fork pages. | HAL/MallocCallstackHandler.h | |
virtual void OnPreFork () |
Notifies the malloc implementation that the process is about to fork. | HAL/MallocCallstackHandler.h | |
virtual SIZE_T QuantizeSize
(
SIZE_T Count, |
For some allocators this will return the actual size that should be requested to eliminate internal fragmentation. | HAL/MallocCallstackHandler.h | |
virtual void * Realloc
(
void* Original, |
Realloc | HAL/MallocCallstackHandler.h | |
virtual void SetupTLSCachesOnCurrentThread() |
Set up TLS caches on the current thread. These are the threads that we can trim. | HAL/MallocCallstackHandler.h | |
virtual void Trim
(
bool bTrimThreadCaches |
Releases as much memory as possible. Must be called from the main thread. | HAL/MallocCallstackHandler.h | |
virtual void UpdateStats () |
Called once per frame, gathers and sets all memory allocator statistics into the corresponding stats. | HAL/MallocCallstackHandler.h | |
virtual bool ValidateHeap() |
Validates the allocator's heap | HAL/MallocCallstackHandler.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DecDisabled() |
HAL/MallocCallstackHandler.h | ||
virtual int32 GetCallStackIndex() |
HAL/MallocCallstackHandler.h | ||
void IncDisabled() |
HAL/MallocCallstackHandler.h | ||
virtual bool IsDisabled() |
HAL/MallocCallstackHandler.h | ||
void TrackFree
(
void* Ptr, |
HAL/MallocCallstackHandler.h | ||
void TrackMalloc
(
void* Ptr, |
HAL/MallocCallstackHandler.h | ||
virtual void TrackRealloc
(
void* OldPtr, |
HAL/MallocCallstackHandler.h |