UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UnixPlatformMemory.cpp File Reference
#include "Unix/UnixPlatformMemory.h"
#include "Unix/UnixForkPageProtector.h"
#include "Misc/AssertionMacros.h"
#include "Misc/CoreDelegates.h"
#include "Misc/FeedbackContext.h"
#include "Math/NumericLimits.h"
#include "Math/UnrealMathUtility.h"
#include "Templates/UnrealTemplate.h"
#include "Containers/UnrealString.h"
#include "Logging/LogMacros.h"
#include "HAL/MallocAnsi.h"
#include "HAL/MallocMimalloc.h"
#include "HAL/MallocJemalloc.h"
#include "HAL/MallocBinned.h"
#include "HAL/MallocBinned2.h"
#include "HAL/MallocReplayProxy.h"
#include "HAL/MallocStomp.h"
#include "HAL/PlatformMallocCrash.h"
#include "ProfilingDebugging/CsvProfiler.h"
#include <sys/sysinfo.h>
#include <sys/file.h>
#include <sys/mman.h>
#include "GenericPlatform/OSAllocationPool.h"
#include "Misc/ScopeLock.h"

Classes

struct  FOSAllocationDescriptor
 
struct  FProcField
 
struct  FPageParseState
 
struct  FProcFieldWithOffset
 

Macros

#define UE4_PLATFORM_REDUCE_NUMBER_OF_MAPS   (0 && PLATFORM_UNIX && PLATFORM_64BITS)
 
#define UE4_DO_ROOT_PRIVILEGE_CHECK   0
 
#define USE_PROC_SELF_SMAPS_ROLLUP   0
 
#define MALLOC_LEAKDETECTION   0
 
#define UE4_PLATFORM_SANITY_CHECK_OS_ALLOCATIONS   (UE_BUILD_DEBUG || (UE_BUILD_DEVELOPMENT && (UE_GAME || UE_SERVER) && !MALLOC_LEAKDETECTION))
 

Functions

 CSV_DECLARE_CATEGORY_EXTERN (FMemory)
 

Variables

bool CORE_API GFullCrashCallstack = false
 
bool CORE_API GUseKSM = false
 
bool CORE_API GKSMMergeAllPages = false
 
bool CORE_API GTimeEnsures = true
 
int32 CORE_API GSignalToDefault = 0
 
uint64 CORE_API GCrashHandlerStackSize = 0
 
bool GAllowExclusiveLockOnWrite = true
 
int32 CORE_API GMaxNumberFileMappingCache = 100
 
float GVMAPoolScale
 
bool GMemoryRangeDecommitIsNoOp = (UE_SERVER == 0)
 

Macro Definition Documentation

◆ MALLOC_LEAKDETECTION

#define MALLOC_LEAKDETECTION   0

◆ UE4_DO_ROOT_PRIVILEGE_CHECK

#define UE4_DO_ROOT_PRIVILEGE_CHECK   0

◆ UE4_PLATFORM_REDUCE_NUMBER_OF_MAPS

#define UE4_PLATFORM_REDUCE_NUMBER_OF_MAPS   (0 && PLATFORM_UNIX && PLATFORM_64BITS)

◆ UE4_PLATFORM_SANITY_CHECK_OS_ALLOCATIONS

#define UE4_PLATFORM_SANITY_CHECK_OS_ALLOCATIONS   (UE_BUILD_DEBUG || (UE_BUILD_DEVELOPMENT && (UE_GAME || UE_SERVER) && !MALLOC_LEAKDETECTION))

◆ USE_PROC_SELF_SMAPS_ROLLUP

#define USE_PROC_SELF_SMAPS_ROLLUP   0

Function Documentation

◆ CSV_DECLARE_CATEGORY_EXTERN()

CSV_DECLARE_CATEGORY_EXTERN ( FMemory  )

Variable Documentation

◆ GAllowExclusiveLockOnWrite

bool GAllowExclusiveLockOnWrite = true

◆ GCrashHandlerStackSize

uint64 CORE_API GCrashHandlerStackSize = 0

◆ GFullCrashCallstack

bool CORE_API GFullCrashCallstack = false

◆ GKSMMergeAllPages

bool CORE_API GKSMMergeAllPages = false

◆ GMaxNumberFileMappingCache

int32 CORE_API GMaxNumberFileMappingCache = 100

◆ GMemoryRangeDecommitIsNoOp

bool GMemoryRangeDecommitIsNoOp = (UE_SERVER == 0)

Make Decommit no-op (this significantly speeds up freeing memory at the expense of larger resident footprint)

◆ GSignalToDefault

int32 CORE_API GSignalToDefault = 0

◆ GTimeEnsures

bool CORE_API GTimeEnsures = true

◆ GUseKSM

bool CORE_API GUseKSM = false

◆ GVMAPoolScale

float GVMAPoolScale
extern

Controls growth of pools - see PooledVirtualMemoryAllocator.cpp