UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FAndroidPlatformMemory Struct Reference

#include <AndroidPlatformMemory.h>

+ Inheritance diagram for FAndroidPlatformMemory:

Classes

class  FPlatformVirtualMemoryBlock
 

Public Types

enum class  ETrimValues {
  Unknown = -1 , Complete = 80 , Moderate = 60 , Background = 40 ,
  UI_Hidden = 20 , Running_Critical = 15 , Running_Low = 10 , Running_Moderate = 5
}
 
enum class  EOSMemoryStatusCategory { OSTrim }
 
- Public Types inherited from FGenericPlatformMemory
enum  EMemoryCounterRegion {
  MCR_Invalid , MCR_Physical , MCR_GPU , MCR_GPUSystem ,
  MCR_TexturePool , MCR_StreamingPool , MCR_UsedStreamingPool , MCR_GPUDefragPool ,
  MCR_PhysicalLLM , MCR_MAX
}
 
enum  EMemoryAllocatorToUse {
  Ansi , Stomp , TBB , Jemalloc ,
  Binned , Binned2 , Binned3 , Platform ,
  Mimalloc , Libpas
}
 
enum  ESharedMemoryAccess { Read = (1 << 1) , Write = (1 << 2) }
 

Static Public Member Functions

static CORE_API void Init ()
 
static CORE_API FPlatformMemoryStats GetStats ()
 
static CORE_API uint64 GetMemoryUsedFast ()
 
static CORE_API const FPlatformMemoryConstantsGetConstants ()
 
static CORE_API EPlatformMemorySizeBucket GetMemorySizeBucket ()
 
static CORE_API FMallocBaseAllocator ()
 
static CORE_API voidBinnedAllocFromOS (SIZE_T Size)
 
static CORE_API void BinnedFreeToOS (void *Ptr, SIZE_T Size)
 
static CORE_API bool GetLLMAllocFunctions (void *(*&OutAllocFunction)(size_t), void(*&OutFreeFunction)(void *, size_t), int32 &OutAlignment)
 
static CORE_API void UpdateOSMemoryStatus (EOSMemoryStatusCategory OSMemoryStatusCategory, int value)
 
static void AndroidMemoryProbeStart ()
 
static void AndroidMemoryProbeStop ()
 
static void AndroidMemoryProbeTick ()
 
- Static Public Member Functions inherited from FGenericPlatformMemory
static CORE_API void Init ()
 
static CORE_API void OnOutOfMemory (uint64 Size, uint32 Alignment)
 
static CORE_API void SetupMemoryPools ()
 
static uint32 GetBackMemoryPoolSize ()
 
static CORE_API FMallocBaseAllocator ()
 
static CORE_API FPlatformMemoryStats GetStats ()
 
static CORE_API FPlatformMemoryStats GetStatsRaw ()
 
static CORE_API uint64 GetMemoryUsedFast ()
 
static CORE_API void GetStatsForMallocProfiler (FGenericMemoryStats &out_Stats)
 
static CORE_API const FPlatformMemoryConstantsGetConstants ()
 
static CORE_API uint32 GetPhysicalGBRam ()
 
static CORE_API bool PageProtect (void *const Ptr, const SIZE_T Size, const bool bCanRead, const bool bCanWrite)
 
static CORE_API voidBinnedAllocFromOS (SIZE_T Size)
 
static CORE_API void BinnedFreeToOS (void *Ptr, SIZE_T Size)
 
static void MiMallocInit ()
 
static void NanoMallocInit ()
 
static bool PtrIsOSMalloc (void *Ptr)
 
static bool IsNanoMallocAvailable ()
 
static bool PtrIsFromNanoMalloc (void *Ptr)
 
static bool BinnedPlatformHasMemoryPoolForThisSize (SIZE_T Size)
 
static CORE_API void DumpStats (FOutputDevice &Ar)
 
static CORE_API void DumpPlatformAndAllocatorStats (FOutputDevice &Ar)
 
static CORE_API EPlatformMemorySizeBucket GetMemorySizeBucket ()
 
static UE_FORCEINLINE_HINT voidMemmove (void *Dest, const void *Src, SIZE_T Count)
 
static UE_FORCEINLINE_HINT int32 Memcmp (const void *Buf1, const void *Buf2, SIZE_T Count)
 
static UE_FORCEINLINE_HINT voidMemset (void *Dest, uint8 Char, SIZE_T Count)
 
static UE_FORCEINLINE_HINT voidMemzero (void *Dest, SIZE_T Count)
 
static UE_FORCEINLINE_HINT voidMemcpy (void *Dest, const void *Src, SIZE_T Count)
 
static UE_FORCEINLINE_HINT voidBigBlockMemcpy (void *Dest, const void *Src, SIZE_T Count)
 
static UE_FORCEINLINE_HINT voidStreamingMemcpy (void *Dest, const void *Src, SIZE_T Count)
 
static voidParallelMemcpy (void *Dest, const void *Src, SIZE_T Count, EMemcpyCachePolicy Policy=EMemcpyCachePolicy::StoreCached)
 
static void Memswap (void *Ptr1, void *Ptr2, SIZE_T Size)
 
template<typename T >
staticReadUnaligned (const void *Ptr)
 
template<typename T >
static UE_FORCEINLINE_HINT void WriteUnaligned (void *Ptr, const T &InValue)
 
static CORE_API FSharedMemoryRegionMapNamedSharedMemoryRegion (const FString &Name, bool bCreate, uint32 AccessMode, SIZE_T Size)
 
static CORE_API bool UnmapNamedSharedMemoryRegion (FSharedMemoryRegion *MemoryRegion)
 
static UE_FORCEINLINE_HINT bool SupportsFastVRAMMemory ()
 
static CORE_API bool IsExtraDevelopmentMemoryAvailable ()
 
static CORE_API uint64 GetExtraDevelopmentMemorySize ()
 
static uint64 GetProgramSize ()
 
static void SetProgramSize (uint64 InProgramSize)
 
static CORE_API bool GetLLMAllocFunctions (void *(*&OutAllocFunction)(size_t), void(*&OutFreeFunction)(void *, size_t), int32 &OutAlignment)
 
static UE_FORCEINLINE_HINT void OnLowLevelMemory_Alloc (void const *Pointer, uint64 Size, uint64 Tag)
 
static UE_FORCEINLINE_HINT void OnLowLevelMemory_Free (void const *Pointer, uint64 Size, uint64 Tag)
 
static void RegisterCustomLLMTags ()
 
static void UpdateCustomLLMTags ()
 
static bool TracksLLMAllocations ()
 
static bool HasForkPageProtectorEnabled ()
 
static bool GetForkedPageAllocationInfo (TArray< FForkedPageAllocation > &OutPageAllocationInfos)
 
static CORE_API FString PrettyMemory (uint64 Memory)
 
static UE_FORCEINLINE_HINT bool CanOverallocateVirtualMemory ()
 

Additional Inherited Members

- Static Public Attributes inherited from FGenericPlatformMemory
static CORE_API bool bIsOOM = false
 
static CORE_API uint64 OOMAllocationSize = 0
 
static CORE_API uint32 OOMAllocationAlignment = 0
 
static CORE_API voidBackupOOMMemoryPool = nullptr
 
static CORE_API uint32 BackupOOMMemoryPoolSize
 
static CORE_API EMemoryAllocatorToUse AllocatorToUse = Platform
 
- Static Protected Member Functions inherited from FGenericPlatformMemory
static CORE_API void InternalUpdateStats (const FPlatformMemoryStats &MemoryStats)
 
- Static Protected Attributes inherited from FGenericPlatformMemory
static CORE_API uint64 ProgramSize = 0
 

Detailed Description

Android implementation of the memory OS functions

Member Enumeration Documentation

◆ EOSMemoryStatusCategory

Enumerator
OSTrim 

◆ ETrimValues

Enumerator
Unknown 
Complete 
Moderate 
Background 
UI_Hidden 
Running_Critical 
Running_Low 
Running_Moderate 

Member Function Documentation

◆ AndroidMemoryProbeStart()

void FAndroidPlatformMemory::AndroidMemoryProbeStart ( )
static

◆ AndroidMemoryProbeStop()

void FAndroidPlatformMemory::AndroidMemoryProbeStop ( )
static

◆ AndroidMemoryProbeTick()

void FAndroidPlatformMemory::AndroidMemoryProbeTick ( )
static

◆ BaseAllocator()

FMalloc * FAndroidPlatformMemory::BaseAllocator ( )
static

◆ BinnedAllocFromOS()

void * FAndroidPlatformMemory::BinnedAllocFromOS ( SIZE_T  Size)
static

◆ BinnedFreeToOS()

void FAndroidPlatformMemory::BinnedFreeToOS ( void Ptr,
SIZE_T  Size 
)
static

◆ GetConstants()

const FPlatformMemoryConstants & FAndroidPlatformMemory::GetConstants ( )
static

◆ GetLLMAllocFunctions()

bool FAndroidPlatformMemory::GetLLMAllocFunctions ( void *(*&)(size_t OutAllocFunction,
void(*&)(void *, size_t OutFreeFunction,
int32 OutAlignment 
)
static

LLM uses these low level functions (LLMAlloc and LLMFree) to allocate memory. It grabs the function pointers by calling FPlatformMemory::GetLLMAllocFunctions. If these functions are not implemented GetLLMAllocFunctions should return false and LLM will be disabled.

◆ GetMemorySizeBucket()

EPlatformMemorySizeBucket FAndroidPlatformMemory::GetMemorySizeBucket ( )
static

◆ GetMemoryUsedFast()

uint64 FAndroidPlatformMemory::GetMemoryUsedFast ( )
static

◆ GetStats()

FPlatformMemoryStats FAndroidPlatformMemory::GetStats ( )
static

◆ Init()

void FAndroidPlatformMemory::Init ( )
static

◆ UpdateOSMemoryStatus()

void FAndroidPlatformMemory::UpdateOSMemoryStatus ( EOSMemoryStatusCategory  OSMemoryStatusCategory,
int  value 
)
static

The documentation for this struct was generated from the following files: