UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GenericPlatformMemory.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3
4/*=============================================================================================
5 GenericPlatformMemory.h: Generic platform memory classes
6==============================================================================================*/
7
8#pragma once
9
10#include "CoreFwd.h" // IWYU pragma: keep
11#include "CoreTypes.h"
12#include "HAL/PlatformString.h"
13
14#include <string.h>
15#include <wchar.h>
16
17class FMalloc;
18class FOutputDevice;
19class FString;
23
24#ifndef UE_CHECK_LARGE_ALLOCATIONS
25#define UE_CHECK_LARGE_ALLOCATIONS 0
26#endif
27
28#if UE_CHECK_LARGE_ALLOCATIONS
30namespace UE::Memory::Private
31{
35}
36#endif
37
42#define PLATFORM_MEMORY_SIZE_BUCKET_LIST(XBUCKET) \
43 /* not used with texture LODs (you can't use bigger textures than what is cooked out, which is what Default should map to) */ \
44 XBUCKET(Largest) \
45 XBUCKET(Larger) \
46 /* these are used by texture LODs */ \
47 XBUCKET(Default) \
48 XBUCKET(Smaller) \
49 XBUCKET(Smallest) \
50 XBUCKET(Tiniest) \
51
52#define PLATFORM_MEMORY_SIZE_BUCKET_ENUM(Name) Name,
57#undef PLATFORM_MEMORY_SIZE_BUCKET_ENUM
58
60{
61#define PLATFORM_MEMORY_SIZE_BUCKET_LEXTOSTRING(Name) case EPlatformMemorySizeBucket::Name: return TEXT(#Name);
62 switch (Bucket)
63 {
65 }
66#undef PLATFORM_MEMORY_SIZE_BUCKET_LEXTOSTRING
67
68 return TEXT("Unknown");
69}
70
72{
73 // Writes to destination memory are cache-visible (default).
74 // This should be used if copy results are immediately accessed by CPU.
76
77 // Writes to destination memory bypass cache (avoiding pollution).
78 // Optimizes for large copies that aren't read from soon after.
80};
81
125
127
184
185// Contains shared/private information for a single page allocation from the kernel. A page
186// allocation may contain many pages.
188{
189 // Start/End virtual address for the allocation.
192
193 // The amount of memory in this allocation range that is shared across the forked
194 // child processes.
197
198 // The amount of memory in this allocation range that has been written to by the child
199 // process, and as a result has been made unique to the process.
202};
203
204
205
207
212#if PLATFORM_USES_MICROSOFT_LIBC_FUNCTIONS
213#define __FMemory_Alloca_Func _alloca
214#else
215#define __FMemory_Alloca_Func alloca
216#endif
217
218#define FMemory_Alloca(Size) ((Size==0) ? 0 : (void*)(((PTRINT)__FMemory_Alloca_Func(Size + 15) + 15) & ~15))
219
220 // Version that supports alignment requirement. However since the old alignment was always forced to be 16, this continues to enforce a min alignment of 16 but allows a larger value.
221#define FMemory_Alloca_Aligned(Size, Alignment) ((Size==0) ? 0 : ((Alignment <= 16) ? FMemory_Alloca(Size) : (void*)(((PTRINT)__FMemory_Alloca_Func(Size + Alignment-1) + Alignment-1) & ~(Alignment-1))))
222
225{
227 static CORE_API bool bIsOOM;
228
231
234
237
240
249 {
250 MCR_Invalid, // not memory
251 MCR_Physical, // main system memory
252 MCR_GPU, // memory directly a GPU (graphics card, etc)
253 MCR_GPUSystem, // system memory directly accessible by a GPU
254 MCR_TexturePool, // presized texture pools
255 MCR_StreamingPool, // amount of texture pool available for streaming.
256 MCR_UsedStreamingPool, // amount of texture pool used for streaming.
257 MCR_GPUDefragPool, // presized pool of memory that can be defragmented.
258 MCR_PhysicalLLM, // total physical memory including CPU and GPU
259 MCR_MAX
260 };
261
264 {
265 Ansi, // Default C allocator
266 Stomp, // Allocator to check for memory stomping
267 TBB, // Thread Building Blocks malloc
268 Jemalloc, // Linux/FreeBSD malloc
269 Binned, // Older binned malloc
270 Binned2, // Newer binned malloc
271 Binned3, // Newer VM-based binned malloc, 64 bit only
272 Platform, // Custom platform specific allocator
273 Mimalloc, // mimalloc
274 Libpas, // libpas
275 };
276
279
284 {
285 Read = (1 << 1),
286 Write = (1 << 2)
287 };
288
293 {
295 const TCHAR * GetName() const { return Name; }
296
298 void * GetAddress() { return Address; }
299
301 const void * GetAddress() const { return Address; }
302
304 SIZE_T GetSize() const { return Size; }
305
306
307 FSharedMemoryRegion(const FString& InName, uint32 InAccessMode, void* InAddress, SIZE_T InSize);
308
309 protected:
310
312 {
314 };
315
318
321
323 void * Address;
324
327 };
328
329
330
332 static CORE_API void Init();
333
334 [[noreturn]] static CORE_API void OnOutOfMemory(uint64 Size, uint32 Alignment);
335
337 static CORE_API void SetupMemoryPools();
338
339
344 {
345 // by default, don't create a backup memory buffer
346 return 0;
347 }
348
353
358
363
368
373
378
383
393 static CORE_API bool PageProtect(void* const Ptr, const SIZE_T Size, const bool bCanRead, const bool bCanWrite);
394
403
410 static CORE_API void BinnedFreeToOS( void* Ptr, SIZE_T Size );
411
416 static void MiMallocInit()
417 {
418 }
419
424 static void NanoMallocInit()
425 {
426 return;
427 }
428
437 static bool PtrIsOSMalloc( void* Ptr)
438 {
439 return false;
440 }
441
451 {
452 return false;
453 }
454
463 static bool PtrIsFromNanoMalloc( void* Ptr)
464 {
465 return false;
466 }
467
469 {
470 protected:
471 void *Ptr;
473
474 public:
475
477 : Ptr(nullptr)
479 {
480 }
481
487
490
495
497 {
498 return Ptr;
499 }
500
501
502#if 0 // documentation, must be defined by the platform
503 void Commit(size_t InOffset, size_t InSize);
504 void Decommit(size_t InOffset, size_t InSize);
505 void FreeVirtual();
506
507 UE_FORCEINLINE_HINT void CommitByPtr(void *InPtr, size_t InSize)
508 {
509 Commit(size_t(((uint8*)InPtr) - ((uint8*)Ptr)), InSize);
510 }
511
512 UE_FORCEINLINE_HINT void DecommitByPtr(void *InPtr, size_t InSize)
513 {
514 Decommit(size_t(((uint8*)InPtr) - ((uint8*)Ptr)), InSize);
515 }
516
517 UE_FORCEINLINE_HINT void Commit()
518 {
519 Commit(0, GetActualSize());
520 }
521
522 UE_FORCEINLINE_HINT void Decommit()
523 {
524 Decommit(0, GetActualSize());
525 }
526
527 UE_FORCEINLINE_HINT size_t GetActualSize() const
528 {
529 return VMSizeDivVirtualSizeAlignment * GetVirtualSizeAlignment();
530 }
531
538 static FPlatformVirtualMemoryBlock AllocateVirtual(size_t Size, size_t InAlignment = FPlatformVirtualMemoryBlock::GetVirtualSizeAlignment());
539 static size_t GetCommitAlignment();
540 static size_t GetVirtualSizeAlignment();
541#endif
542 };
543
549 {
550 return false;
551 }
552
554 static CORE_API void DumpStats( FOutputDevice& Ar );
555
558
563
571 static UE_FORCEINLINE_HINT void* Memmove( void* Dest, const void* Src, SIZE_T Count )
572 {
573 return memmove( Dest, Src, Count );
574 }
575
576 static UE_FORCEINLINE_HINT int32 Memcmp( const void* Buf1, const void* Buf2, SIZE_T Count )
577 {
578 return memcmp( Buf1, Buf2, Count );
579 }
580
581 static UE_FORCEINLINE_HINT void* Memset(void* Dest, uint8 Char, SIZE_T Count)
582 {
583 return memset( Dest, Char, Count );
584 }
585
586 static UE_FORCEINLINE_HINT void* Memzero(void* Dest, SIZE_T Count)
587 {
588 return memset( Dest, 0, Count );
589 }
590
591 static UE_FORCEINLINE_HINT void* Memcpy(void* Dest, const void* Src, SIZE_T Count)
592 {
593 return memcpy( Dest, Src, Count );
594 }
595
597 static UE_FORCEINLINE_HINT void* BigBlockMemcpy(void* Dest, const void* Src, SIZE_T Count)
598 {
599 return memcpy(Dest, Src, Count);
600 }
601
603 static UE_FORCEINLINE_HINT void* StreamingMemcpy(void* Dest, const void* Src, SIZE_T Count)
604 {
605 return memcpy( Dest, Src, Count );
606 }
607
609 static inline void* ParallelMemcpy(void* Dest, const void* Src, SIZE_T Count, EMemcpyCachePolicy Policy = EMemcpyCachePolicy::StoreCached)
610 {
611 (void)Policy;
612 return memcpy( Dest, Src, Count );
613 }
614
615private:
616 template <typename T>
617 static inline void Valswap(T& A, T& B)
618 {
619 // Usually such an implementation would use move semantics, but
620 // we're only ever going to call it on fundamental types and MoveTemp
621 // is not necessarily in scope here anyway, so we don't want to
622 // #include it if we don't need to.
623 T Tmp = A;
624 A = B;
625 B = Tmp;
626 }
627
628 static CORE_API void MemswapGreaterThan8( void* Ptr1, void* Ptr2, SIZE_T Size );
629
630public:
631 static inline void Memswap( void* Ptr1, void* Ptr2, SIZE_T Size )
632 {
633 switch (Size)
634 {
635 case 0:
636 break;
637
638 case 1:
639 Valswap(*(uint8*)Ptr1, *(uint8*)Ptr2);
640 break;
641
642 case 2:
643 Valswap(*(uint16*)Ptr1, *(uint16*)Ptr2);
644 break;
645
646 case 3:
647 Valswap(*((uint16*&)Ptr1)++, *((uint16*&)Ptr2)++);
648 Valswap(*(uint8*)Ptr1, *(uint8*)Ptr2);
649 break;
650
651 case 4:
652 Valswap(*(uint32*)Ptr1, *(uint32*)Ptr2);
653 break;
654
655 case 5:
656 Valswap(*((uint32*&)Ptr1)++, *((uint32*&)Ptr2)++);
657 Valswap(*(uint8*)Ptr1, *(uint8*)Ptr2);
658 break;
659
660 case 6:
661 Valswap(*((uint32*&)Ptr1)++, *((uint32*&)Ptr2)++);
662 Valswap(*(uint16*)Ptr1, *(uint16*)Ptr2);
663 break;
664
665 case 7:
666 Valswap(*((uint32*&)Ptr1)++, *((uint32*&)Ptr2)++);
667 Valswap(*((uint16*&)Ptr1)++, *((uint16*&)Ptr2)++);
668 Valswap(*(uint8*)Ptr1, *(uint8*)Ptr2);
669 break;
670
671 case 8:
672 Valswap(*(uint64*)Ptr1, *(uint64*)Ptr2);
673 break;
674
675 case 16:
676 Valswap(((uint64*)Ptr1)[0], ((uint64*)Ptr2)[0]);
677 Valswap(((uint64*)Ptr1)[1], ((uint64*)Ptr2)[1]);
678 break;
679
680 default:
681 MemswapGreaterThan8(Ptr1, Ptr2, Size);
682 break;
683 }
684 }
685
692 template <typename T>
693 static inline T ReadUnaligned(const void* Ptr)
694 {
695 T AlignedT;
696 memcpy((void*)&AlignedT, Ptr, sizeof(T));
697 return AlignedT;
698 }
699
706 template <typename T>
707 static UE_FORCEINLINE_HINT void WriteUnaligned(void* Ptr, const T& InValue)
708 {
709 memcpy(Ptr, &InValue, sizeof(T));
710 }
711
722 static CORE_API FSharedMemoryRegion* MapNamedSharedMemoryRegion(const FString& Name, bool bCreate, uint32 AccessMode, SIZE_T Size);
723
731 static CORE_API bool UnmapNamedSharedMemoryRegion(FSharedMemoryRegion * MemoryRegion);
732
740 {
741 return false;
742 }
743
749
755
760 {
761 return ProgramSize;
762 }
763
771
776 static CORE_API bool GetLLMAllocFunctions(void*(*&OutAllocFunction)(size_t), void(*&OutFreeFunction)(void*, size_t), int32& OutAlignment);
777
782 UE_FORCEINLINE_HINT static void OnLowLevelMemory_Alloc(void const* Pointer, uint64 Size, uint64 Tag) { }
783 UE_FORCEINLINE_HINT static void OnLowLevelMemory_Free(void const* Pointer, uint64 Size, uint64 Tag) { }
784
788 static void RegisterCustomLLMTags() { };
789
794 static void UpdateCustomLLMTags() { };
795
803 static bool TracksLLMAllocations() { return false; }
804
809 static bool HasForkPageProtectorEnabled() { return false; }
810
816 {
817 return false; // Most platform do not implement this.
818 }
819
826 static CORE_API FString PrettyMemory( uint64 Memory );
827
833 {
834 return true;
835 }
836
837 // This bit is always zero in user mode addresses and most likely won't be used by current or future
838 // CPU features like ARM's PAC / Top-Byte Ignore or Intel's Linear Address Masking / 5-Level Paging
839#if defined(__x86_64__) || defined(_M_X64)
840 static constexpr uint32 KernelAddressBit = 63;
841#elif defined(__aarch64__) || defined(_M_ARM64)
842 static constexpr uint32 KernelAddressBit = 55;
843#endif
844
845protected:
846 friend struct FGenericStatsUpdater;
847
849 static CORE_API void InternalUpdateStats( const FPlatformMemoryStats& MemoryStats );
850
853};
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define UE_FORCEINLINE_HINT
Definition Platform.h:723
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FGenericPlatformMemoryConstants FPlatformMemoryConstants
Definition GenericPlatformMemory.h:126
const TCHAR * LexToString(EPlatformMemorySizeBucket Bucket)
Definition GenericPlatformMemory.h:59
#define PLATFORM_MEMORY_SIZE_BUCKET_LIST(XBUCKET)
Definition GenericPlatformMemory.h:42
#define PLATFORM_MEMORY_SIZE_BUCKET_LEXTOSTRING(Name)
#define PLATFORM_MEMORY_SIZE_BUCKET_ENUM(Name)
Definition GenericPlatformMemory.h:52
EMemcpyCachePolicy
Definition GenericPlatformMemory.h:72
EPlatformMemorySizeBucket
Definition GenericPlatformMemory.h:54
@ Char
Character type.
uint32 Size
Definition VulkanMemory.cpp:4034
memcpy(InputBufferBase, BinkBlocksData, BinkBlocksSize)
uint8_t uint8
Definition binka_ue_file_header.h:8
uint16_t uint16
Definition binka_ue_file_header.h:7
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition IConsoleManager.h:1580
Definition GenericPlatformMemory.h:469
FBasicVirtualMemoryBlock(void *InPtr, uint32 InVMSizeDivVirtualSizeAlignment)
Definition GenericPlatformMemory.h:482
FBasicVirtualMemoryBlock(const FBasicVirtualMemoryBlock &Other)=default
void * Ptr
Definition GenericPlatformMemory.h:471
UE_FORCEINLINE_HINT uint32 GetActualSizeInPages() const
Definition GenericPlatformMemory.h:491
FBasicVirtualMemoryBlock & operator=(const FBasicVirtualMemoryBlock &Other)=default
UE_FORCEINLINE_HINT void * GetVirtualPointer() const
Definition GenericPlatformMemory.h:496
FBasicVirtualMemoryBlock()
Definition GenericPlatformMemory.h:476
uint32 VMSizeDivVirtualSizeAlignment
Definition GenericPlatformMemory.h:472
Definition MemoryBase.h:99
Definition OutputDevice.h:133
Definition Array.h:670
Definition GenericPlatformMemory.h:188
uint64 SharedCleanKiB
Definition GenericPlatformMemory.h:195
uint64 PrivateCleanKiB
Definition GenericPlatformMemory.h:200
uint64 PageStart
Definition GenericPlatformMemory.h:190
uint64 SharedDirtyKiB
Definition GenericPlatformMemory.h:196
uint64 PrivateDirtyKiB
Definition GenericPlatformMemory.h:201
uint64 PageEnd
Definition GenericPlatformMemory.h:191
Definition MemoryMisc.h:21
Definition GenericPlatformMemory.h:87
uint64 AddressLimit
Definition GenericPlatformMemory.h:120
SIZE_T BinnedAllocationGranularity
Definition GenericPlatformMemory.h:107
uint64 TotalPhysical
Definition GenericPlatformMemory.h:89
uint32 TotalPhysicalGB
Definition GenericPlatformMemory.h:123
SIZE_T PageSize
Definition GenericPlatformMemory.h:95
uint64 AddressStart
Definition GenericPlatformMemory.h:113
SIZE_T OsAllocationGranularity
Definition GenericPlatformMemory.h:101
SIZE_T BinnedPageSize
Definition GenericPlatformMemory.h:104
uint64 TotalVirtual
Definition GenericPlatformMemory.h:92
Definition GenericPlatformMemory.h:167
const TCHAR * Name
Definition GenericPlatformMemory.h:168
uint64 Value
Definition GenericPlatformMemory.h:169
FPlatformSpecificStat(const TCHAR *InName, uint64 InValue)
Definition GenericPlatformMemory.h:171
Definition GenericPlatformMemory.h:133
uint64 AvailablePhysical
Definition GenericPlatformMemory.h:135
uint64 UsedPhysical
Definition GenericPlatformMemory.h:141
CORE_API FGenericPlatformMemoryStats()
Definition GenericPlatformMemory.cpp:153
uint64 PeakUsedVirtual
Definition GenericPlatformMemory.h:150
CORE_API uint64 GetAvailablePhysical(bool bExcludeExtraDevMemory) const
Definition GenericPlatformMemory.cpp:583
CORE_API EMemoryPressureStatus GetMemoryPressureStatus() const
Definition GenericPlatformMemory.cpp:163
uint64 AvailableVirtual
Definition GenericPlatformMemory.h:138
void SetEndFrameCsvStats() const
Definition GenericPlatformMemory.h:182
EMemoryPressureStatus
Definition GenericPlatformMemory.h:155
CORE_API TArray< FPlatformSpecificStat > GetPlatformSpecificStats() const
Definition GenericPlatformMemory.cpp:578
uint64 UsedVirtual
Definition GenericPlatformMemory.h:147
uint64 PeakUsedPhysical
Definition GenericPlatformMemory.h:144
Definition GenericPlatformMemory.h:293
TCHAR Name[MaxSharedMemoryName]
Definition GenericPlatformMemory.h:317
void * Address
Definition GenericPlatformMemory.h:323
Limits
Definition GenericPlatformMemory.h:312
@ MaxSharedMemoryName
Definition GenericPlatformMemory.h:313
const void * GetAddress() const
Definition GenericPlatformMemory.h:301
SIZE_T Size
Definition GenericPlatformMemory.h:326
uint32 AccessMode
Definition GenericPlatformMemory.h:320
SIZE_T GetSize() const
Definition GenericPlatformMemory.h:304
void * GetAddress()
Definition GenericPlatformMemory.h:298
const TCHAR * GetName() const
Definition GenericPlatformMemory.h:295
Definition GenericPlatformMemory.h:225
static bool HasForkPageProtectorEnabled()
Definition GenericPlatformMemory.h:809
static T ReadUnaligned(const void *Ptr)
Definition GenericPlatformMemory.h:693
EMemoryAllocatorToUse
Definition GenericPlatformMemory.h:264
@ Binned
Definition GenericPlatformMemory.h:269
@ Binned2
Definition GenericPlatformMemory.h:270
@ Ansi
Definition GenericPlatformMemory.h:265
@ Platform
Definition GenericPlatformMemory.h:272
@ TBB
Definition GenericPlatformMemory.h:267
@ Stomp
Definition GenericPlatformMemory.h:266
@ Mimalloc
Definition GenericPlatformMemory.h:273
@ Jemalloc
Definition GenericPlatformMemory.h:268
@ Libpas
Definition GenericPlatformMemory.h:274
@ Binned3
Definition GenericPlatformMemory.h:271
static CORE_API void BinnedFreeToOS(void *Ptr, SIZE_T Size)
static CORE_API FMalloc * BaseAllocator()
Definition GenericPlatformMemory.cpp:276
static UE_FORCEINLINE_HINT void WriteUnaligned(void *Ptr, const T &InValue)
Definition GenericPlatformMemory.h:707
static CORE_API uint64 GetMemoryUsedFast()
Definition GenericPlatformMemory.cpp:300
static CORE_API void * BinnedAllocFromOS(SIZE_T Size)
static bool PtrIsOSMalloc(void *Ptr)
Definition GenericPlatformMemory.h:437
static CORE_API EMemoryAllocatorToUse AllocatorToUse
Definition GenericPlatformMemory.h:278
static UE_FORCEINLINE_HINT void OnLowLevelMemory_Free(void const *Pointer, uint64 Size, uint64 Tag)
Definition GenericPlatformMemory.h:783
static CORE_API uint32 OOMAllocationAlignment
Definition GenericPlatformMemory.h:233
static bool IsNanoMallocAvailable()
Definition GenericPlatformMemory.h:450
static CORE_API uint64 OOMAllocationSize
Definition GenericPlatformMemory.h:230
static void UpdateCustomLLMTags()
Definition GenericPlatformMemory.h:794
static uint64 GetProgramSize()
Definition GenericPlatformMemory.h:759
static UE_FORCEINLINE_HINT void * Memzero(void *Dest, SIZE_T Count)
Definition GenericPlatformMemory.h:586
static UE_FORCEINLINE_HINT int32 Memcmp(const void *Buf1, const void *Buf2, SIZE_T Count)
Definition GenericPlatformMemory.h:576
static CORE_API uint32 GetPhysicalGBRam()
Definition GenericPlatformMemory.cpp:331
static CORE_API void GetStatsForMallocProfiler(FGenericMemoryStats &out_Stats)
Definition GenericPlatformMemory.cpp:305
static CORE_API bool PageProtect(void *const Ptr, const SIZE_T Size, const bool bCanRead, const bool bCanWrite)
Definition GenericPlatformMemory.cpp:336
static CORE_API FSharedMemoryRegion * MapNamedSharedMemoryRegion(const FString &Name, bool bCreate, uint32 AccessMode, SIZE_T Size)
Definition GenericPlatformMemory.cpp:545
static CORE_API void InternalUpdateStats(const FPlatformMemoryStats &MemoryStats)
Definition GenericPlatformMemory.cpp:558
EMemoryCounterRegion
Definition GenericPlatformMemory.h:249
@ MCR_GPUSystem
Definition GenericPlatformMemory.h:253
@ MCR_TexturePool
Definition GenericPlatformMemory.h:254
@ MCR_GPU
Definition GenericPlatformMemory.h:252
@ MCR_UsedStreamingPool
Definition GenericPlatformMemory.h:256
@ MCR_Physical
Definition GenericPlatformMemory.h:251
@ MCR_PhysicalLLM
Definition GenericPlatformMemory.h:258
@ MCR_Invalid
Definition GenericPlatformMemory.h:250
@ MCR_GPUDefragPool
Definition GenericPlatformMemory.h:257
@ MCR_MAX
Definition GenericPlatformMemory.h:259
@ MCR_StreamingPool
Definition GenericPlatformMemory.h:255
static CORE_API FString PrettyMemory(uint64 Memory)
Definition GenericPlatformMemory.cpp:598
static UE_FORCEINLINE_HINT void * StreamingMemcpy(void *Dest, const void *Src, SIZE_T Count)
Definition GenericPlatformMemory.h:603
static CORE_API bool IsExtraDevelopmentMemoryAvailable()
Definition GenericPlatformMemory.cpp:563
static void RegisterCustomLLMTags()
Definition GenericPlatformMemory.h:788
static UE_FORCEINLINE_HINT void * BigBlockMemcpy(void *Dest, const void *Src, SIZE_T Count)
Definition GenericPlatformMemory.h:597
static CORE_API void Init()
Definition GenericPlatformMemory.cpp:202
static CORE_API FPlatformMemoryStats GetStats()
Definition GenericPlatformMemory.cpp:289
static CORE_API EPlatformMemorySizeBucket GetMemorySizeBucket()
Definition GenericPlatformMemory.cpp:371
static uint32 GetBackMemoryPoolSize()
Definition GenericPlatformMemory.h:343
static CORE_API bool UnmapNamedSharedMemoryRegion(FSharedMemoryRegion *MemoryRegion)
Definition GenericPlatformMemory.cpp:551
static UE_FORCEINLINE_HINT bool CanOverallocateVirtualMemory()
Definition GenericPlatformMemory.h:832
static UE_FORCEINLINE_HINT void * Memcpy(void *Dest, const void *Src, SIZE_T Count)
Definition GenericPlatformMemory.h:591
ESharedMemoryAccess
Definition GenericPlatformMemory.h:284
@ Read
Definition GenericPlatformMemory.h:285
@ Write
Definition GenericPlatformMemory.h:286
static void Memswap(void *Ptr1, void *Ptr2, SIZE_T Size)
Definition GenericPlatformMemory.h:631
static CORE_API void SetupMemoryPools()
Definition GenericPlatformMemory.cpp:180
static CORE_API void * BackupOOMMemoryPool
Definition GenericPlatformMemory.h:236
static void NanoMallocInit()
Definition GenericPlatformMemory.h:424
static CORE_API uint32 BackupOOMMemoryPoolSize
Definition GenericPlatformMemory.h:239
static bool TracksLLMAllocations()
Definition GenericPlatformMemory.h:803
static CORE_API uint64 ProgramSize
Definition GenericPlatformMemory.h:852
static CORE_API void OnOutOfMemory(uint64 Size, uint32 Alignment)
Definition GenericPlatformMemory.cpp:216
static CORE_API const FPlatformMemoryConstants & GetConstants()
Definition GenericPlatformMemory.cpp:324
static CORE_API void DumpPlatformAndAllocatorStats(FOutputDevice &Ar)
Definition GenericPlatformMemory.cpp:365
static CORE_API uint64 GetExtraDevelopmentMemorySize()
Definition GenericPlatformMemory.cpp:568
static void MiMallocInit()
Definition GenericPlatformMemory.h:416
static CORE_API bool GetLLMAllocFunctions(void *(*&OutAllocFunction)(size_t), void(*&OutFreeFunction)(void *, size_t), int32 &OutAlignment)
Definition GenericPlatformMemory.cpp:573
static CORE_API bool bIsOOM
Definition GenericPlatformMemory.h:227
static void * ParallelMemcpy(void *Dest, const void *Src, SIZE_T Count, EMemcpyCachePolicy Policy=EMemcpyCachePolicy::StoreCached)
Definition GenericPlatformMemory.h:609
static CORE_API FPlatformMemoryStats GetStatsRaw()
Definition GenericPlatformMemory.cpp:295
static CORE_API void DumpStats(FOutputDevice &Ar)
Definition GenericPlatformMemory.cpp:343
static UE_FORCEINLINE_HINT void * Memset(void *Dest, uint8 Char, SIZE_T Count)
Definition GenericPlatformMemory.h:581
static bool PtrIsFromNanoMalloc(void *Ptr)
Definition GenericPlatformMemory.h:463
static bool GetForkedPageAllocationInfo(TArray< FForkedPageAllocation > &OutPageAllocationInfos)
Definition GenericPlatformMemory.h:815
static void SetProgramSize(uint64 InProgramSize)
Definition GenericPlatformMemory.h:767
static UE_FORCEINLINE_HINT bool SupportsFastVRAMMemory()
Definition GenericPlatformMemory.h:739
static bool BinnedPlatformHasMemoryPoolForThisSize(SIZE_T Size)
Definition GenericPlatformMemory.h:548
static UE_FORCEINLINE_HINT void * Memmove(void *Dest, const void *Src, SIZE_T Count)
Definition GenericPlatformMemory.h:571
static UE_FORCEINLINE_HINT void OnLowLevelMemory_Alloc(void const *Pointer, uint64 Size, uint64 Tag)
Definition GenericPlatformMemory.h:782
Definition GenericPlatformMemory.cpp:99
Definition AndroidPlatformMemory.h:15