Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/GenericPlatform
Inheritance Hierarchy
- FGenericPlatformMemory
- FUnixPlatformMemory
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMemory.h |
Include | #include "GenericPlatform/GenericPlatformMemory.h" |
Syntax
struct FGenericPlatformMemory
Remarks
Generic implementation for most platforms, these tend to be unused and unimplemented.
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FMalloc * | ||
![]() ![]() |
void * | BigBlockMemcpy
(
void* Dest, |
Memcpy optimized for big blocks. |
![]() ![]() |
void * | BinnedAllocFromOS
(
SIZE_T Size |
Allocates pages from the OS. |
![]() ![]() |
void | BinnedFreeToOS
(
void* Ptr, |
Returns pages allocated by BinnedAllocFromOS to the OS. |
![]() ![]() |
bool | BinnedPlatformHasMemoryPoolForThisSize
(
SIZE_T Size |
Some platforms may pool allocations of this size to reduce OS calls. |
![]() ![]() |
void | Dumps basic platform memory statistics and allocator specific statistics into the specified output device. | |
![]() ![]() |
void | DumpStats
(
FOutputDevice& Ar |
Dumps basic platform memory statistics into the specified output device. |
![]() ![]() |
uint32 | ||
![]() ![]() |
const FPlatformMemoryConstants & | GetConstants () |
|
![]() ![]() |
uint64 | Returns >0 if debug memory has been assigned to the title for general use. | |
![]() ![]() |
bool | GetLLMAllocFunctions
(
void*(*&)(size_t) OutAllocFunction, |
This function sets AllocFunction and FreeFunction and returns true, or just returns false. |
![]() ![]() |
EPlatformMemorySizeBucket | Return which "high level", per platform, memory bucket we are in | |
![]() ![]() |
uint64 | ||
![]() ![]() |
uint32 | ||
![]() ![]() |
FPlatformMemoryStats | GetStats () |
|
![]() ![]() |
void | GetStatsForMallocProfiler
(
FGenericMemoryStats& out_Stats |
Writes all platform specific current memory statistics in the format usable by the malloc profiler. |
![]() ![]() |
bool | Returns true if Protecting the parent processes pages has been enabled Only supported on platforms that support forking | |
![]() ![]() |
void | Init () |
Initializes platform memory specific constants. |
![]() ![]() |
void | InternalUpdateStats
(
const FPlatformMemoryStats& MemoryStats |
Updates platform specific stats. |
![]() ![]() |
bool | Returns true if debug memory has been assigned to the title for general use. | |
![]() ![]() |
bool | Nano Malloc is Apple's tiny block allocator. Does the Nano malloc zone exist? | |
![]() ![]() |
FSharedMemoryRegion * | MapNamedSharedMemoryRegion
(
const FString& Name, |
Maps a named shared memory region into process address space (creates or opens it) |
![]() ![]() |
int32 | Memcmp
(
const void* Buf1, |
|
![]() ![]() |
void * | Memcpy
(
void* Dest, |
|
![]() ![]() |
void * | Memmove
(
void* Dest, |
Copies count bytes of characters from Src to Dest. |
![]() ![]() |
void * | Memset
(
void* Dest, |
|
![]() ![]() |
void | Memswap
(
void* Ptr1, |
|
![]() ![]() |
void * | Memzero
(
void* Dest, |
|
![]() ![]() |
void | MiMallocInit () |
Performs initial setup for MiMalloc. |
![]() ![]() |
void | Performs initial setup for Nano malloc. This is a noop on non-apple platforms | |
![]() ![]() |
void | OnLowLevelMemory_Alloc
(
void const* Pointer, |
Called for all default tracker LLM allocations and frees, when LLM is enabled. |
![]() ![]() |
void | OnLowLevelMemory_Free
(
void const* Pointer, |
|
![]() ![]() |
void | OnOutOfMemory
(
uint64 Size, |
|
![]() ![]() |
bool | PageProtect
(
void*const Ptr, |
Changes the protection on a region of committed pages in the virtual address space. |
![]() ![]() |
void * | ParallelMemcpy
(
void* Dest, |
On some platforms memcpy can be distributed over multiple threads for throughput. |
![]() ![]() |
bool | PtrIsFromNanoMalloc
(
void* Ptr |
Was this pointer allocated by in the Nano Malloc Zone? Currently only Apple platforms implement this to detect small block allocations. |
![]() ![]() |
bool | PtrIsOSMalloc
(
void* Ptr |
Was this pointer allocated by the OS malloc? Currently only Apple platforms implement this to detect small block allocations. |
![]() ![]() |
T | ReadUnaligned
(
const void* Ptr |
Loads a simple POD type from unaligned memory. |
![]() ![]() |
void | Called once at LLM initialization time to let the platform add any custom tags | |
![]() ![]() |
void | Initializes the memory pools, should be called by the init function. | |
![]() ![]() |
void * | StreamingMemcpy
(
void* Dest, |
On some platforms memcpy optimized for big blocks that avoid L2 cache pollution are available |
![]() ![]() |
bool | Gets whether this platform supports Fast VRAM memory Ie, whether TexCreate_FastVRAM flags actually mean something or not | |
![]() ![]() |
bool | Indicates whether LLM allocations are already accounted for with tracking and in GetStats. | |
![]() ![]() |
bool | UnmapNamedSharedMemoryRegion
(
FSharedMemoryRegion* MemoryRegion |
Unmaps a name shared memory region |
![]() ![]() |
void | Called once per frame when LLM is collating the data for the current frame. | |
![]() ![]() |
void | WriteUnaligned
(
void* Ptr, |
Stores a simple POD type to unaligned memory. |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FBasicVirtualMemoryBlock | ||
![]() |
FSharedMemoryRegion | Generic representation of a shared memory region |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
EMemoryAllocatorToUse | Which allocator is being used | |
![]() |
EMemoryCounterRegion | Various memory regions that can be used with memory stats. | |
![]() |
ESharedMemoryAccess | Flags used for shared memory creation/open |
Constants
Name | Description |
---|---|
AllocatorToUse | Current allocator |
BackupOOMMemoryPool | Preallocated buffer to delete on out of memory. Used by OOM handling and crash reporting. |
BackupOOMMemoryPoolSize | Size of BackupOOMMemoryPool in bytes. |
bIsOOM | Set to true if we encounters out of memory. |
OOMAllocationAlignment | Set to alignment of allocation that triggered out of memory, zero otherwise. |
OOMAllocationSize | Set to size of allocation that triggered out of memory, zero otherwise. |