Ark Server API (ASA) - Wiki
|
#include <MallocThreadSafeProxy.h>
Private Attributes | |
FMalloc * | UsedMalloc |
FCriticalSection | SynchronizationObject |
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 synchronizes access, making the used malloc thread safe.
Definition at line 13 of file MallocThreadSafeProxy.h.
|
inline |
Constructor for thread safe proxy malloc that takes a malloc to be used and a synchronization object used via FScopeLock as a parameter.
InMalloc | FMalloc that is going to be used for actual allocations |
Definition at line 28 of file MallocThreadSafeProxy.h.
|
inlineoverridevirtual |
Dumps allocator stats to an output device.
Reimplemented from FMalloc.
Definition at line 75 of file MallocThreadSafeProxy.h.
|
inlineoverridevirtual |
Exec handler
InWorld | World context |
Cmd | Command to parse |
Ar | Output device to log to |
Reimplemented from FExec.
Definition at line 90 of file MallocThreadSafeProxy.h.
Free
Implements FMalloc.
Definition at line 58 of file MallocThreadSafeProxy.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 103 of file MallocThreadSafeProxy.h.
|
inlineoverridevirtual |
Writes allocator stats from the last update into the specified destination.
Reimplemented from FMalloc.
Definition at line 68 of file MallocThreadSafeProxy.h.
Gets descriptive name for logging purposes.
Reimplemented from FMalloc.
Definition at line 109 of file MallocThreadSafeProxy.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 32 of file MallocThreadSafeProxy.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 123 of file MallocThreadSafeProxy.h.
|
inlineoverridevirtual |
Malloc
Implements FMalloc.
Definition at line 40 of file MallocThreadSafeProxy.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 128 of file MallocThreadSafeProxy.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 138 of file MallocThreadSafeProxy.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 133 of file MallocThreadSafeProxy.h.
|
inlineoverridevirtual |
Realloc
Implements FMalloc.
Definition at line 49 of file MallocThreadSafeProxy.h.
Releases as much memory as possible. Must be called from the main thread.
Reimplemented from FMalloc.
Definition at line 116 of file MallocThreadSafeProxy.h.
Validates the allocator's heap
Reimplemented from FMalloc.
Definition at line 84 of file MallocThreadSafeProxy.h.
|
private |
Object used for synchronization via a scoped lock
Definition at line 19 of file MallocThreadSafeProxy.h.
|
private |
Malloc we're based on, aka using under the hood
Definition at line 17 of file MallocThreadSafeProxy.h.