Ark Server API (ASA) - Wiki
|
#include <MallocCallstackHandler.h>
Classes | |
struct | FCallStackInfo |
struct | FCallStackMapKey |
Static Public Attributes | |
static constexpr SIZE_T | MaxCallStackDepth = 64 |
static constexpr SIZE_T | CallStackEntriesToSkipCount = 2 |
Static Public Attributes inherited from FMalloc | |
static TAtomic< uint64 > | MaxSingleAlloc |
Protected Member Functions | |
FORCEINLINE void | IncDisabled () |
FORCEINLINE void | DecDisabled () |
virtual bool | IsDisabled () |
virtual void | TrackRealloc (void *OldPtr, void *NewPtr, uint32 NewSize, uint32 OldSize, int32 CallStackIndex) |
virtual void | TrackMalloc (void *Ptr, uint32 Size, int32 CallStackIndex)=0 |
virtual void | TrackFree (void *Ptr, uint32 OldSize, int32 CallStackIndex)=0 |
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) |
Friends | |
class | FScopeDisableMallocCallstackHandler |
Definition at line 15 of file MallocCallstackHandler.h.
FMallocCallstackHandler::FMallocCallstackHandler | ( | FMalloc * | InMalloc | ) |
|
inlineoverridevirtual |
Clears the TLS caches on the current thread and disables any future caching.
Reimplemented from FMalloc.
Definition at line 77 of file MallocCallstackHandler.h.
|
inlineprotected |
Definition at line 217 of file MallocCallstackHandler.h.
|
inlineoverridevirtual |
Dumps current allocator stats to the log.
Reimplemented from FMalloc.
Definition at line 104 of file MallocCallstackHandler.h.
Free
Implements FMalloc.
|
inlineoverridevirtual |
If possible determine the size of the memory allocated at the given address
Original | - Pointer to memory we are checking the size of |
SizeOut | - If possible, this value is set to the size of the passed in pointer |
Reimplemented from FMalloc.
Definition at line 53 of file MallocCallstackHandler.h.
|
inlineoverridevirtual |
Writes allocator stats from the last update into the specified destination.
Reimplemented from FMalloc.
Definition at line 98 of file MallocCallstackHandler.h.
Gets descriptive name for logging purposes.
Reimplemented from FMalloc.
Definition at line 131 of file MallocCallstackHandler.h.
|
inlineprotected |
Definition at line 210 of file MallocCallstackHandler.h.
Reimplemented in FMallocDoubleFreeFinder, and FMallocFrameProfiler.
Initializes stats metadata. We need to do this as soon as possible, but cannot be done in the constructor due to the FName::StaticInit
Reimplemented from FMalloc.
Definition at line 86 of file MallocCallstackHandler.h.
Reimplemented in FMallocFrameProfiler.
Definition at line 223 of file MallocCallstackHandler.h.
Returns if the allocator is guaranteed to be thread-safe and therefore doesn't need a unnecessary thread-safety wrapper around it.
Reimplemented from FMalloc.
Definition at line 113 of file MallocCallstackHandler.h.
|
overridevirtual |
Malloc
Implements FMalloc.
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
Reimplemented from FMalloc.
Definition at line 136 of file MallocCallstackHandler.h.
Notifies the malloc implementation that the process has forked so we can try and avoid dirtying pre-fork pages.
Reimplemented from FMalloc.
Definition at line 146 of file MallocCallstackHandler.h.
Notifies the malloc implementation that the process is about to fork. May be used to trim caches etc.
Reimplemented from FMalloc.
Definition at line 141 of file MallocCallstackHandler.h.
|
inlineoverridevirtual |
For some allocators this will return the actual size that should be requested to eliminate internal fragmentation. The return value will always be >= Count. This can be used to grow and shrink containers to optimal sizes. This call is always fast and thread safe with no locking.
Reimplemented from FMalloc.
Definition at line 41 of file MallocCallstackHandler.h.
|
overridevirtual |
Realloc
Implements FMalloc.
Set up TLS caches on the current thread. These are the threads that we can trim.
Reimplemented from FMalloc.
Definition at line 69 of file MallocCallstackHandler.h.
|
protectedpure virtual |
Implemented in FMallocDoubleFreeFinder, and FMallocFrameProfiler.
|
protectedpure virtual |
Implemented in FMallocDoubleFreeFinder, and FMallocFrameProfiler.
|
protectedvirtual |
Reimplemented in FMallocFrameProfiler.
Releases as much memory as possible. Must be called from the main thread.
Reimplemented from FMalloc.
Definition at line 61 of file MallocCallstackHandler.h.
Called once per frame, gathers and sets all memory allocator statistics into the corresponding stats. MUST BE THREAD SAFE.
Reimplemented from FMalloc.
Reimplemented in FMallocFrameProfiler.
Definition at line 92 of file MallocCallstackHandler.h.
Validates the allocator's heap
Reimplemented from FMalloc.
Definition at line 121 of file MallocCallstackHandler.h.
Definition at line 201 of file MallocCallstackHandler.h.
Definition at line 152 of file MallocCallstackHandler.h.
|
protected |
Definition at line 235 of file MallocCallstackHandler.h.
|
protected |
Definition at line 234 of file MallocCallstackHandler.h.
|
protected |
Definition at line 207 of file MallocCallstackHandler.h.
|
protected |
Definition at line 208 of file MallocCallstackHandler.h.
|
protected |
Definition at line 206 of file MallocCallstackHandler.h.
Definition at line 151 of file MallocCallstackHandler.h.
|
protected |
Definition at line 232 of file MallocCallstackHandler.h.
|
protected |
Malloc we're based on, aka using under the hood
Definition at line 205 of file MallocCallstackHandler.h.