Ark Server API (ASA) - Wiki
|
#include <MemoryBase.h>
Static Public Attributes | |
static TAtomic< uint64 > | MaxSingleAlloc |
Friends | |
struct | FCurrentFrameCalls |
Additional Inherited Members | |
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) |
The global memory allocator's interface.
Definition at line 82 of file MemoryBase.h.
Clears the TLS caches on the current thread and disables any future caching.
Reimplemented in FMallocBinned2, FMallocCallstackHandler, and FMallocPoisonProxy.
Definition at line 155 of file MemoryBase.h.
|
inlinevirtual |
Dumps current allocator stats to the log.
Reimplemented in FMallocBinned, FMallocBinned2, FMallocCallstackHandler, FMallocPoisonProxy, FMallocThreadSafeProxy, and FMallocDebug.
Definition at line 181 of file MemoryBase.h.
Free
Implemented in FGenericPlatformMallocCrash, FGenericStackBasedMallocCrash, FMallocDebug, FMallocCallstackHandler, FMallocAnsi, FMallocBinned, FMallocBinned2, FMallocPoisonProxy, and FMallocThreadSafeProxy.
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 in FGenericPlatformMallocCrash, FMallocAnsi, FMallocBinned, FMallocCallstackHandler, FMallocDebug, FMallocPoisonProxy, FMallocThreadSafeProxy, and FMallocBinned2.
Definition at line 133 of file MemoryBase.h.
|
virtual |
Writes allocator stats from the last update into the specified destination.
Reimplemented in FMallocBinned, FMallocBinned2, FMallocCallstackHandler, FMallocPoisonProxy, and FMallocThreadSafeProxy.
Gets descriptive name for logging purposes.
Reimplemented in FGenericPlatformMallocCrash, FGenericStackBasedMallocCrash, FMallocAnsi, FMallocBinned, FMallocBinned2, FMallocCallstackHandler, FMallocDebug, FMallocPoisonProxy, and FMallocThreadSafeProxy.
Definition at line 208 of file MemoryBase.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 in FMallocBinned, FMallocCallstackHandler, FMallocPoisonProxy, and FMallocThreadSafeProxy.
Returns if the allocator is guaranteed to be thread-safe and therefore doesn't need a unnecessary thread-safety wrapper around it.
Reimplemented in FGenericPlatformMallocCrash, FMallocAnsi, FMallocBinned, FMallocBinned2, FMallocCallstackHandler, FMallocPoisonProxy, and FMallocThreadSafeProxy.
Definition at line 190 of file MemoryBase.h.
|
pure virtual |
Malloc
Implemented in FMallocCallstackHandler, FGenericPlatformMallocCrash, FGenericStackBasedMallocCrash, FMallocAnsi, FMallocBinned, FMallocBinned2, FMallocDebug, FMallocPoisonProxy, and FMallocThreadSafeProxy.
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 in FMallocBinned2, FMallocCallstackHandler, FMallocPoisonProxy, and FMallocThreadSafeProxy.
Definition at line 216 of file MemoryBase.h.
Notifies the malloc implementation that the process has forked so we can try and avoid dirtying pre-fork pages.
Reimplemented in FMallocBinned2, FMallocCallstackHandler, FMallocPoisonProxy, and FMallocThreadSafeProxy.
Definition at line 226 of file MemoryBase.h.
Notifies the malloc implementation that the process is about to fork. May be used to trim caches etc.
Reimplemented in FMallocBinned2, FMallocCallstackHandler, FMallocPoisonProxy, and FMallocThreadSafeProxy.
Definition at line 221 of file MemoryBase.h.
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 in FMallocBinned, FMallocBinned2, FMallocCallstackHandler, and FMallocPoisonProxy.
Definition at line 121 of file MemoryBase.h.
|
pure virtual |
Realloc
Implemented in FMallocDebug, FMallocCallstackHandler, FGenericPlatformMallocCrash, FGenericStackBasedMallocCrash, FMallocAnsi, FMallocBinned, FMallocBinned2, FMallocPoisonProxy, and FMallocThreadSafeProxy.
Set up TLS caches on the current thread. These are the threads that we can trim.
Reimplemented in FMallocBinned2, FMallocCallstackHandler, and FMallocPoisonProxy.
Definition at line 148 of file MemoryBase.h.
Releases as much memory as possible. Must be called from the main thread.
Reimplemented in FMallocBinned2, FMallocCallstackHandler, FMallocPoisonProxy, and FMallocThreadSafeProxy.
Definition at line 141 of file MemoryBase.h.
|
virtual |
TryMalloc - like Malloc(), but may return a nullptr result if the allocation request cannot be satisfied.
Reimplemented in FMallocAnsi.
|
virtual |
TryRealloc - like Realloc(), but may return a nullptr if the allocation request cannot be satisfied. Note that in this case the memory pointed to by Original will still be valid
Reimplemented in FMallocAnsi.
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 in FMallocBinned, FMallocBinned2, FMallocCallstackHandler, FMallocFrameProfiler, and FMallocPoisonProxy.
Validates the allocator's heap
Reimplemented in FGenericPlatformMallocCrash, FMallocAnsi, FMallocBinned, FMallocBinned2, FMallocCallstackHandler, FMallocDebug, FMallocPoisonProxy, and FMallocThreadSafeProxy.
Definition at line 198 of file MemoryBase.h.
Definition at line 229 of file MemoryBase.h.
Limits the maximum single allocation, to this many bytes, for debugging
Definition at line 234 of file MemoryBase.h.