Ark Server API (ASA) - Wiki
|
#include <MallocPoisonProxy.h>
Private Attributes | |
FMalloc * | UsedMalloc |
Additional Inherited Members | |
Static Public Attributes inherited from FMalloc | |
static TAtomic< uint64 > | MaxSingleAlloc |
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) |
FMalloc proxy that poisons new and freed allocations, helping to catch code that relies on uninitialized or freed memory.
Definition at line 24 of file MallocPoisonProxy.h.
|
inlineexplicit |
Definition at line 32 of file MallocPoisonProxy.h.
Clears the TLS caches on the current thread and disables any future caching.
Reimplemented from FMalloc.
Definition at line 142 of file MallocPoisonProxy.h.
|
inlineoverridevirtual |
Dumps current allocator stats to the log.
Reimplemented from FMalloc.
Definition at line 102 of file MallocPoisonProxy.h.
|
inlineoverridevirtual |
Exec handler
InWorld | World context |
Cmd | Command to parse |
Ar | Output device to log to |
Reimplemented from FExec.
Definition at line 117 of file MallocPoisonProxy.h.
Free
Implements FMalloc.
Definition at line 74 of file MallocPoisonProxy.h.
|
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 122 of file MallocPoisonProxy.h.
|
inlineoverridevirtual |
Writes allocator stats from the last update into the specified destination.
Reimplemented from FMalloc.
Definition at line 97 of file MallocPoisonProxy.h.
Gets descriptive name for logging purposes.
Reimplemented from FMalloc.
Definition at line 127 of file MallocPoisonProxy.h.
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 38 of file MallocPoisonProxy.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 107 of file MallocPoisonProxy.h.
Malloc
Implements FMalloc.
Definition at line 43 of file MallocPoisonProxy.h.
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 147 of file MallocPoisonProxy.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 158 of file MallocPoisonProxy.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 152 of file MallocPoisonProxy.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 threadsafe with no locking.
Reimplemented from FMalloc.
Definition at line 87 of file MallocPoisonProxy.h.
|
inlineoverridevirtual |
Realloc
Implements FMalloc.
Definition at line 53 of file MallocPoisonProxy.h.
Set up TLS caches on the current thread. These are the threads that we can trim.
Reimplemented from FMalloc.
Definition at line 137 of file MallocPoisonProxy.h.
Releases as much memory as possible. Must be called from the main thread.
Reimplemented from FMalloc.
Definition at line 132 of file MallocPoisonProxy.h.
Handles any commands passed in on the command line This was commented out to make initial build -wooly Called once per frame, gathers and sets all memory allocator statistics into the corresponding stats. MUST BE THREAD SAFE.
Reimplemented from FMalloc.
Definition at line 92 of file MallocPoisonProxy.h.
Validates the allocator's heap
Reimplemented from FMalloc.
Definition at line 112 of file MallocPoisonProxy.h.
|
private |
Malloc we're based on, aka using under the hood
Definition at line 28 of file MallocPoisonProxy.h.