#include <UnrealMemory.h>
|
static FORCEINLINE void * | Memmove (void *Dest, const void *Src, SIZE_T Count) |
|
static FORCEINLINE int32 | Memcmp (const void *Buf1, const void *Buf2, SIZE_T Count) |
|
static FORCEINLINE void * | Memset (void *Dest, uint8 Char, SIZE_T Count) |
|
template<class T > |
static FORCEINLINE void | Memset (T &Src, uint8 ValueToSet) |
|
static FORCEINLINE void * | Memzero (void *Dest, SIZE_T Count) |
|
static FORCEINLINE bool | MemIsZero (const void *Ptr, SIZE_T Count) |
|
template<class T > |
static FORCEINLINE void | Memzero (T &Src) |
|
static FORCEINLINE void * | Memcpy (void *Dest, const void *Src, SIZE_T Count) |
|
template<class T > |
static FORCEINLINE void | Memcpy (T &Dest, const T &Src) |
|
static FORCEINLINE void * | BigBlockMemcpy (void *Dest, const void *Src, SIZE_T Count) |
|
static FORCEINLINE void * | StreamingMemcpy (void *Dest, const void *Src, SIZE_T Count) |
|
static FORCEINLINE void * | ParallelMemcpy (void *Dest, const void *Src, SIZE_T Count, EMemcpyCachePolicy Policy=EMemcpyCachePolicy::StoreCached) |
|
static FORCEINLINE void | Memswap (void *Ptr1, void *Ptr2, SIZE_T Size) |
|
static FORCEINLINE void * | SystemMalloc (SIZE_T Size) |
|
static FORCEINLINE void | SystemFree (void *Ptr) |
|
static void * | Malloc (SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT) |
|
static void * | Realloc (void *Original, SIZE_T Size, uint32 Alignment=DEFAULT_ALIGNMENT) |
|
static void | Free (void *Original) |
|
static SIZE_T | GetAllocSize (void *Original) |
|
static FORCEINLINE_DEBUGGABLE void * | MallocZeroed (SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT) |
|
static SIZE_T | QuantizeSize (SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT) |
|
static void | Trim (bool bTrimThreadCaches=true) |
|
static void | SetupTLSCachesOnCurrentThread () |
|
static void | ClearAndDisableTLSCachesOnCurrentThread () |
|
static void | TestMemory () |
|
static void | EnablePurgatoryTests () |
|
static void | EnablePoisonTests () |
|
static void | ExplicitInit (FMalloc &Allocator) |
|
static void | RegisterPersistentAuxiliary (void *InMemory, SIZE_T InSize) |
|
static void * | MallocPersistentAuxiliary (SIZE_T InSize, uint32 InAlignment=0) |
|
static void | FreePersistentAuxiliary (void *InPtr) |
|
static bool | IsPersistentAuxiliaryActive () |
|
static void | DisablePersistentAuxiliary () |
|
static void | EnablePersistentAuxiliary () |
|
static SIZE_T | GetUsedPersistentAuxiliary () |
|
static void | GCreateMalloc () |
|
static void * | MallocExternal (SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT) |
|
static void * | ReallocExternal (void *Original, SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT) |
|
static void | FreeExternal (void *Original) |
|
static SIZE_T | GetAllocSizeExternal (void *Original) |
|
static SIZE_T | QuantizeSizeExternal (SIZE_T Count, uint32 Alignment=DEFAULT_ALIGNMENT) |
|
Definition at line 93 of file UnrealMemory.h.
◆ AllocationHints
Some allocators can be given hints to treat allocations differently depending on how the memory is used, it's lifetime etc.
Enumerator |
---|
None | |
Default | |
Temporary | |
SmallPool | |
Max | |
Definition at line 96 of file UnrealMemory.h.
◆ BigBlockMemcpy()
◆ ClearAndDisableTLSCachesOnCurrentThread()
static void FMemory::ClearAndDisableTLSCachesOnCurrentThread |
( |
| ) |
|
|
static |
Clears the TLS caches on the current thread and disables any future caching.
◆ DisablePersistentAuxiliary()
static void FMemory::DisablePersistentAuxiliary |
( |
| ) |
|
|
static |
◆ EnablePersistentAuxiliary()
static void FMemory::EnablePersistentAuxiliary |
( |
| ) |
|
|
static |
◆ EnablePoisonTests()
Called once main is started and we have -purgatorymallocproxy. This uses the purgatory malloc proxy to check if things are writing to stale pointers.
◆ EnablePurgatoryTests()
Called once main is started and we have -purgatorymallocproxy. This uses the purgatory malloc proxy to check if things are writing to stale pointers.
◆ ExplicitInit()
Set global allocator instead of creating it lazily on first allocation. Must only be called once and only if lazy init is disabled via a macro.
◆ Free()
◆ FreeExternal()
◆ FreePersistentAuxiliary()
◆ GCreateMalloc()
◆ GetAllocSize()
◆ GetAllocSizeExternal()
◆ GetUsedPersistentAuxiliary()
◆ IsPersistentAuxiliaryActive()
static bool FMemory::IsPersistentAuxiliaryActive |
( |
| ) |
|
|
static |
◆ Malloc()
◆ MallocExternal()
◆ MallocPersistentAuxiliary()
◆ MallocZeroed()
◆ Memcmp()
◆ Memcpy() [1/2]
◆ Memcpy() [2/2]
◆ MemIsZero()
Returns true if memory is zeroes, false otherwise.
Definition at line 137 of file UnrealMemory.h.
◆ Memmove()
◆ Memset() [1/2]
◆ Memset() [2/2]
◆ Memswap()
◆ Memzero() [1/2]
◆ Memzero() [2/2]
◆ ParallelMemcpy()
◆ QuantizeSize()
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.
Definition at line 244 of file UnrealMemory.h.
◆ QuantizeSizeExternal()
◆ Realloc()
◆ ReallocExternal()
◆ RegisterPersistentAuxiliary()
Functions to handle special memory given to the title from the platform This memory is allocated like a stack, it's never really freed
◆ SetupTLSCachesOnCurrentThread()
static void FMemory::SetupTLSCachesOnCurrentThread |
( |
| ) |
|
|
static |
Set up TLS caches on the current thread. These are the threads that we can trim.
◆ StreamingMemcpy()
◆ SystemFree()
◆ SystemMalloc()
◆ TestMemory()
A helper function that will perform a series of random heap allocations to test the internal validity of the heap. Note, this function will "leak" memory, but another call will clean up previously allocated blocks before returning. This will help to A/B testing where you call it in a good state, do something to corrupt memory, then call this again and hopefully freeing some pointers will trigger a crash.
◆ Trim()
Releases as much memory as possible. Must be called from the main thread.
The documentation for this struct was generated from the following file:
- C:/Users/lachl/Downloads/ArkServerAPI_NEW/ASA/AsaApi/AsaApi/Core/Public/API/UE/HAL/UnrealMemory.h