Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FWindowsPlatformMemory Struct Reference

#include <WindowsPlatformMemory.h>

+ Inheritance diagram for FWindowsPlatformMemory:
+ Collaboration diagram for FWindowsPlatformMemory:

Classes

class  FPlatformVirtualMemoryBlock
 
struct  FWindowsSharedMemoryRegion
 

Public Types

enum  EMemoryCounterRegion {
  MCR_Invalid , MCR_Physical , MCR_GPU , MCR_GPUSystem ,
  MCR_TexturePool , MCR_StreamingPool , MCR_UsedStreamingPool , MCR_GPUDefragPool ,
  MCR_SamplePlatformSpecifcMemoryRegion , MCR_PhysicalLLM , MCR_MAX
}
 
- 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
}
 
enum  ESharedMemoryAccess { Read = (1 << 1) , Write = (1 << 2) }
 

Static Public Member Functions

static void Init ()
 
static uint32 GetBackMemoryPoolSize ()
 
static class FMallocBaseAllocator ()
 
static FPlatformMemoryStats GetStats ()
 
static void GetStatsForMallocProfiler (FGenericMemoryStats &out_Stats)
 
static const FPlatformMemoryConstantsGetConstants ()
 
static bool PageProtect (void *const Ptr, const SIZE_T Size, const bool bCanRead, const bool bCanWrite)
 
static voidBinnedAllocFromOS (SIZE_T Size)
 
static void BinnedFreeToOS (void *Ptr, SIZE_T Size)
 
static void MiMallocInit ()
 
static FSharedMemoryRegionMapNamedSharedMemoryRegion (const FString &InName, bool bCreate, uint32 AccessMode, SIZE_T Size, const void *pSecurityAttributes=nullptr)
 
static bool UnmapNamedSharedMemoryRegion (FSharedMemoryRegion *MemoryRegion)
 
static bool GetLLMAllocFunctions (void *(*&OutAllocFunction)(size_t), void(*&OutFreeFunction)(void *, size_t), int32 &OutAlignment)
 
- Static Public Member Functions inherited from FGenericPlatformMemory
static void Init ()
 
static void OnOutOfMemory (uint64 Size, uint32 Alignment)
 
static void SetupMemoryPools ()
 
static uint32 GetBackMemoryPoolSize ()
 
static FMallocBaseAllocator ()
 
static FPlatformMemoryStats GetStats ()
 
static uint64 GetMemoryUsedFast ()
 
static void GetStatsForMallocProfiler (FGenericMemoryStats &out_Stats)
 
static const FPlatformMemoryConstantsGetConstants ()
 
static uint32 GetPhysicalGBRam ()
 
static bool PageProtect (void *const Ptr, const SIZE_T Size, const bool bCanRead, const bool bCanWrite)
 
static voidBinnedAllocFromOS (SIZE_T Size)
 
static 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 void DumpStats (FOutputDevice &Ar)
 
static void DumpPlatformAndAllocatorStats (FOutputDevice &Ar)
 
static EPlatformMemorySizeBucket GetMemorySizeBucket ()
 
static FORCEINLINE voidMemmove (void *Dest, const void *Src, SIZE_T Count)
 
static FORCEINLINE int32 Memcmp (const void *Buf1, const void *Buf2, SIZE_T Count)
 
static FORCEINLINE voidMemset (void *Dest, uint8 Char, SIZE_T Count)
 
static FORCEINLINE voidMemzero (void *Dest, SIZE_T Count)
 
static FORCEINLINE voidMemcpy (void *Dest, const void *Src, SIZE_T Count)
 
static FORCEINLINE voidBigBlockMemcpy (void *Dest, const void *Src, SIZE_T Count)
 
static FORCEINLINE voidStreamingMemcpy (void *Dest, const void *Src, SIZE_T Count)
 
static FORCEINLINE 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 >
static FORCEINLINE T ReadUnaligned (const void *Ptr)
 
template<typename T >
static FORCEINLINE void WriteUnaligned (void *Ptr, const T &InValue)
 
static FSharedMemoryRegionMapNamedSharedMemoryRegion (const FString &Name, bool bCreate, uint32 AccessMode, SIZE_T Size)
 
static bool UnmapNamedSharedMemoryRegion (FSharedMemoryRegion *MemoryRegion)
 
static FORCEINLINE bool SupportsFastVRAMMemory ()
 
static bool IsExtraDevelopmentMemoryAvailable ()
 
static uint64 GetExtraDevelopmentMemorySize ()
 
static bool GetLLMAllocFunctions (void *(*&OutAllocFunction)(size_t), void(*&OutFreeFunction)(void *, size_t), int32 &OutAlignment)
 
static FORCEINLINE void OnLowLevelMemory_Alloc (void const *Pointer, uint64 Size, uint64 Tag)
 
static FORCEINLINE void OnLowLevelMemory_Free (void const *Pointer, uint64 Size, uint64 Tag)
 
static void RegisterCustomLLMTags ()
 
static void UpdateCustomLLMTags ()
 
static bool HasForkPageProtectorEnabled ()
 

Static Protected Member Functions

static void InternalUpdateStats (const FPlatformMemoryStats &MemoryStats)
 
- Static Protected Member Functions inherited from FGenericPlatformMemory
static void InternalUpdateStats (const FPlatformMemoryStats &MemoryStats)
 

Friends

struct FGenericStatsUpdater
 

Additional Inherited Members

- Public Member Functions inherited from FGenericPlatformMemory
template<typename U >
struct __attribute__ ((packed)) TUnaligned
 
- Static Public Attributes inherited from FGenericPlatformMemory
static bool bIsOOM
 
static uint64 OOMAllocationSize
 
static uint32 OOMAllocationAlignment
 
static voidBackupOOMMemoryPool
 
static uint32 BackupOOMMemoryPoolSize
 
static EMemoryAllocatorToUse AllocatorToUse
 

Detailed Description

Windows implementation of the memory OS functions

Definition at line 43 of file WindowsPlatformMemory.h.

Member Enumeration Documentation

◆ EMemoryCounterRegion

Enumerator
MCR_Invalid 
MCR_Physical 
MCR_GPU 
MCR_GPUSystem 
MCR_TexturePool 
MCR_StreamingPool 
MCR_UsedStreamingPool 
MCR_GPUDefragPool 
MCR_SamplePlatformSpecifcMemoryRegion 
MCR_PhysicalLLM 
MCR_MAX 

Definition at line 46 of file WindowsPlatformMemory.h.

Member Function Documentation

◆ BaseAllocator()

static class FMalloc * FWindowsPlatformMemory::BaseAllocator ( )
static

◆ BinnedAllocFromOS()

static void * FWindowsPlatformMemory::BinnedAllocFromOS ( SIZE_T Size)
static

◆ BinnedFreeToOS()

static void FWindowsPlatformMemory::BinnedFreeToOS ( void * Ptr,
SIZE_T Size )
static

◆ GetBackMemoryPoolSize()

static uint32 FWindowsPlatformMemory::GetBackMemoryPoolSize ( )
inlinestatic

Value determined by series of tests on Fortnite with limited process memory. 26MB sufficed to report all test crashes, using 32MB to have some slack. If this pool is too large, use the following values to determine proper size: 2MB pool allowed to report 78% of crashes. 6MB pool allowed to report 90% of crashes.

Definition at line 82 of file WindowsPlatformMemory.h.

◆ GetConstants()

static const FPlatformMemoryConstants & FWindowsPlatformMemory::GetConstants ( )
static

◆ GetLLMAllocFunctions()

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

◆ GetStats()

static FPlatformMemoryStats FWindowsPlatformMemory::GetStats ( )
static

◆ GetStatsForMallocProfiler()

static void FWindowsPlatformMemory::GetStatsForMallocProfiler ( FGenericMemoryStats & out_Stats)
static

◆ Init()

static void FWindowsPlatformMemory::Init ( )
static

◆ InternalUpdateStats()

static void FWindowsPlatformMemory::InternalUpdateStats ( const FPlatformMemoryStats & MemoryStats)
staticprotected

◆ MapNamedSharedMemoryRegion()

static FSharedMemoryRegion * FWindowsPlatformMemory::MapNamedSharedMemoryRegion ( const FString & InName,
bool bCreate,
uint32 AccessMode,
SIZE_T Size,
const void * pSecurityAttributes = nullptr )
static

◆ MiMallocInit()

static void FWindowsPlatformMemory::MiMallocInit ( )
static

◆ PageProtect()

static bool FWindowsPlatformMemory::PageProtect ( void *const Ptr,
const SIZE_T Size,
const bool bCanRead,
const bool bCanWrite )
static

◆ UnmapNamedSharedMemoryRegion()

static bool FWindowsPlatformMemory::UnmapNamedSharedMemoryRegion ( FSharedMemoryRegion * MemoryRegion)
static

Friends And Related Symbol Documentation

◆ FGenericStatsUpdater

friend struct FGenericStatsUpdater
friend

Definition at line 156 of file WindowsPlatformMemory.h.


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