FGenericPlatformMemoryConstants

Struct used to hold common memory constants for all platforms.

Windows
MacOS
Linux

Inheritance Hierarchy

FGenericPlatformMemoryConstants

FGenericPlatformMemoryStats

FPlatformMemoryStats

Syntax

struct FGenericPlatformMemoryConstants

Remarks

Struct used to hold common memory constants for all platforms. These values don't change over the entire life of the executable.

Variables

Name Description

Public variable

uint64

 

AddressLimit

AddressLimit - Second parameter is estimate of the range of addresses expected to be returns by BinnedAllocFromOS().

Public variable

SIZE_T

 

BinnedAllocationGranularity

This is the "allocation granularity" in Binned malloc terms, i.e. BinnedMalloc will allocate the memory in increments of this value.

Public variable

SIZE_T

 

BinnedPageSize

The size of a "page" in Binned2 malloc terms, in bytes.

Public variable

SIZE_T

 

OsAllocationGranularity

Some platforms have advantages if memory is allocated in chunks larger than PageSize (e.g. VirtualAlloc() seems to have 64KB granularity as of now).

Public variable

SIZE_T

 

PageSize

The size of a physical page, in bytes.

Public variable

uint64

 

TotalPhysical

The amount of actual physical memory, in bytes (needs to handle >4GB for 64-bit devices running 32-bit code).

Public variable

uint32

 

TotalPhysicalGB

Approximate physical RAM in GB; 1 on everything except PC.

Public variable

uint64

 

TotalVirtual

The amount of virtual memory, in bytes.

Constructors

Name Description

Public function

FGenericPlatformMemoryConstants()

Default constructor, clears all variables.

Public function

FGenericPlatformMemoryConstants

(
    const FGenericPlatformMemoryConstan...
)

Copy constructor, used by the generic platform memory stats.

References

Module

Core

Header

Runtime/Core/Public/GenericPlatform/GenericPlatformMemory.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback