UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GenericPlatformMemory.h File Reference
#include "CoreFwd.h"
#include "CoreTypes.h"
#include "HAL/PlatformString.h"
#include <string.h>
#include <wchar.h>

Go to the source code of this file.

Classes

struct  FGenericPlatformMemoryConstants
 
struct  FGenericPlatformMemoryStats
 
struct  FGenericPlatformMemoryStats::FPlatformSpecificStat
 
struct  FForkedPageAllocation
 
struct  FGenericPlatformMemory
 
struct  FGenericPlatformMemory::FSharedMemoryRegion
 
class  FGenericPlatformMemory::FBasicVirtualMemoryBlock
 

Macros

#define UE_CHECK_LARGE_ALLOCATIONS   0
 
#define PLATFORM_MEMORY_SIZE_BUCKET_LIST(XBUCKET)
 
#define PLATFORM_MEMORY_SIZE_BUCKET_ENUM(Name)   Name,
 
#define PLATFORM_MEMORY_SIZE_BUCKET_LEXTOSTRING(Name)   case EPlatformMemorySizeBucket::Name: return TEXT(#Name);
 
#define __FMemory_Alloca_Func   alloca
 
#define FMemory_Alloca(Size)   ((Size==0) ? 0 : (void*)(((PTRINT)__FMemory_Alloca_Func(Size + 15) + 15) & ~15))
 
#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))))
 

Typedefs

typedef FGenericPlatformMemoryConstants FPlatformMemoryConstants
 

Enumerations

enum class  EPlatformMemorySizeBucket
 
enum class  EMemcpyCachePolicy : uint8 { StoreCached , StoreUncached }
 

Functions

const TCHARLexToString (EPlatformMemorySizeBucket Bucket)
 

Macro Definition Documentation

◆ __FMemory_Alloca_Func

#define __FMemory_Alloca_Func   alloca

FMemory_Alloca/alloca implementation. This can't be a function, even FORCEINLINE'd because there's no guarantee that the memory returned in a function will stick around for the caller to use.

◆ FMemory_Alloca

#define FMemory_Alloca (   Size)    ((Size==0) ? 0 : (void*)(((PTRINT)__FMemory_Alloca_Func(Size + 15) + 15) & ~15))

◆ FMemory_Alloca_Aligned

#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))))

◆ PLATFORM_MEMORY_SIZE_BUCKET_ENUM

#define PLATFORM_MEMORY_SIZE_BUCKET_ENUM (   Name)    Name,

◆ PLATFORM_MEMORY_SIZE_BUCKET_LEXTOSTRING

#define PLATFORM_MEMORY_SIZE_BUCKET_LEXTOSTRING (   Name)    case EPlatformMemorySizeBucket::Name: return TEXT(#Name);

◆ PLATFORM_MEMORY_SIZE_BUCKET_LIST

#define PLATFORM_MEMORY_SIZE_BUCKET_LIST (   XBUCKET)
Value:
/* not used with texture LODs (you can't use bigger textures than what is cooked out, which is what Default should map to) */ \
XBUCKET(Larger) \
/* these are used by texture LODs */ \
XBUCKET(Smaller) \
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127

Platform-dependent "bucket" for memory size, where Default is the normal, or possibly the largest. This is generally used for texture LOD settings for how to fit in smaller memory devices

◆ UE_CHECK_LARGE_ALLOCATIONS

#define UE_CHECK_LARGE_ALLOCATIONS   0

Typedef Documentation

◆ FPlatformMemoryConstants

Enumeration Type Documentation

◆ EMemcpyCachePolicy

enum class EMemcpyCachePolicy : uint8
strong
Enumerator
StoreCached 
StoreUncached 

◆ EPlatformMemorySizeBucket

Function Documentation

◆ LexToString()

const TCHAR * LexToString ( EPlatformMemorySizeBucket  Bucket)
inline