Struct used to hold common memory constants for all platforms. 更多...
#include <GenericPlatformMemory.h>
类 FGenericPlatformMemoryConstants 继承关系图:Public 成员函数 | |
| FGenericPlatformMemoryConstants () | |
| Default constructor, clears all variables. | |
| FGenericPlatformMemoryConstants (const FGenericPlatformMemoryConstants &Other) | |
| Copy constructor, used by the generic platform memory stats. | |
Public 属性 | |
| SIZE_T | BinnedAllocationGranularity |
| This is the "allocation granularity" in Binned malloc terms, i.e. 更多... | |
| SIZE_T | BinnedPageSize |
| The size of a "page" in Binned2 malloc terms, in bytes. 更多... | |
| SIZE_T | OsAllocationGranularity |
| Some platforms have advantages if memory is allocated in chunks larger than PageSize (e.g. 更多... | |
| SIZE_T | PageSize |
| The size of a physical page, in bytes. 更多... | |
| uint64 | TotalPhysical |
| The amount of actual physical memory, in bytes (needs to handle >4GB for 64-bit devices running 32-bit code). | |
| uint32 | TotalPhysicalGB |
| Approximate physical RAM in GB; 1 on everything except PC. 更多... | |
| uint64 | TotalVirtual |
| The amount of virtual memory, in bytes. | |
Struct used to hold common memory constants for all platforms.
These values don't change over the entire life of the executable.
| SIZE_T FGenericPlatformMemoryConstants::BinnedAllocationGranularity |
This is the "allocation granularity" in Binned malloc terms, i.e.
BinnedMalloc will allocate the memory in increments of this value. If zero, Binned will use BinnedPageSize for this value.
| SIZE_T FGenericPlatformMemoryConstants::BinnedPageSize |
The size of a "page" in Binned2 malloc terms, in bytes.
Should be at least 64KB. BinnedMalloc expects memory returned from BinnedAllocFromOS() to be aligned on BinnedPageSize boundary.
| SIZE_T FGenericPlatformMemoryConstants::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). This value is the minimum allocation size that the system will use behind the scenes.
| SIZE_T FGenericPlatformMemoryConstants::PageSize |
The size of a physical page, in bytes.
This is also the granularity for PageProtect(), commitment and properties (e.g. ability to access) of the physical RAM.
| uint32 FGenericPlatformMemoryConstants::TotalPhysicalGB |
Approximate physical RAM in GB; 1 on everything except PC.
Used for "course tuning", like FPlatformMisc::NumberOfCores().