Freezing_b32Bit

Freezing_b32Bit

#Overview

name: Freezing_b32Bit

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of Freezing_b32Bit is to indicate whether the platform uses 32-bit memory addressing for memory freezing operations. This setting is part of Unreal Engine’s serialization and memory management system, specifically related to the memory freezing feature.

The Unreal Engine subsystem that primarily relies on this setting variable is the Core module, particularly the serialization and memory management components. This can be seen from the file locations where the variable is referenced: Core/Private/Misc/DataDrivenPlatformInfoRegistry.cpp and Core/Private/Serialization/MemoryImage.cpp.

The value of this variable is set through the DataDrivenPlatformInfo.ini file. It is loaded in the LoadDDPIIniSettings function using the DDPIGetBool function.

This variable interacts with other freezing-related variables, such as Freezing_MaxFieldAlignment, Freezing_bForce64BitMemoryImagePointers, and Freezing_bAlignBases. It specifically affects the choice between Freezing_MaxFieldAlignment32 and Freezing_MaxFieldAlignment64.

Developers must be aware that this variable impacts how memory is allocated and accessed, particularly for serialization purposes. It affects the memory layout of objects and can influence performance and compatibility across different platforms.

Best practices when using this variable include:

  1. Ensure it is correctly set for the target platform in the DataDrivenPlatformInfo.ini file.
  2. Consider its impact on cross-platform development, especially when dealing with serialized data that needs to be compatible between 32-bit and 64-bit systems.
  3. Test thoroughly on both 32-bit and 64-bit platforms to ensure correct behavior and performance.
  4. Be mindful of its interaction with other freezing-related variables and how they collectively affect memory management and serialization.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:6, section: [DataDrivenPlatformInfo]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Misc/DataDrivenPlatformInfoRegistry.cpp:342

Scope (from outer to inner):

file
function     static void LoadDDPIIniSettings

Source code excerpt:

	DDPIGetStringArray(IniFile, TEXT("AdditionalRestrictedFolders"), Info.AdditionalRestrictedFolders);

	DDPIGetBool(IniFile, TEXT("Freezing_b32Bit"), Info.Freezing_b32Bit);
	DDPIGetUInt(IniFile, Info.Freezing_b32Bit ? TEXT("Freezing_MaxFieldAlignment32") : TEXT("Freezing_MaxFieldAlignment64"), Info.Freezing_MaxFieldAlignment);
	DDPIGetBool(IniFile, TEXT("Freezing_bForce64BitMemoryImagePointers"), Info.Freezing_bForce64BitMemoryImagePointers);
	DDPIGetBool(IniFile, TEXT("Freezing_bAlignBases"), Info.Freezing_bAlignBases);

	DDPIGetGuid(IniFile, TEXT("GlobalIdentifier"), Info.GlobalIdentifier);
	checkf(Info.GlobalIdentifier != FGuid(), TEXT("Platform %s didn't have a valid GlobalIdentifier set in DataDrivenPlatformInfo.ini"), *PlatformName.ToString());

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Serialization/MemoryImage.cpp:65

Scope (from outer to inner):

file
function     void FPlatformTypeLayoutParameters::InitializeForPlatform

Source code excerpt:

	Flags = Flag_Initialized;
	if (bHasEditorOnlyData) Flags |= Flag_WithEditorOnly;
	if (PlatformInfo.Freezing_b32Bit) Flags |= Flag_Is32Bit;
	if (PlatformInfo.Freezing_bAlignBases) Flags |= Flag_AlignBases;

	MaxFieldAlignment = PlatformInfo.Freezing_MaxFieldAlignment;
}

void FPlatformTypeLayoutParameters::InitializeForCurrent()

#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/Misc/DataDrivenPlatformInfoRegistry.h:141

Scope: file

Source code excerpt:

	// MemoryFreezing information, matches FPlatformTypeLayoutParameters - defaults are clang, noneditor
	uint32 Freezing_MaxFieldAlignment = 0xffffffff;
	bool Freezing_b32Bit = false;
	bool Freezing_bForce64BitMemoryImagePointers = false;
	bool Freezing_bAlignBases = false;

	// True if this platform has a non-generic gamepad specifically associated with it
	bool bHasDedicatedGamepad = false;