Linux AddressLimit always 4Gb+1

It seems that UE4.27.2 always caps memory bucket to Smallest on Linux platform due to AddressLimit never being set to anything other than 2^32+1:

[2021.06.07-17.27.59:792][  0]LogHAL: Display: Platform has ~ 4 GB [33190780928 / 4294967296 / 31], which maps to Smallest [LargestMinGB=32, LargerMinGB=12, DefaultMinGB=8, SmallerMinGB=6, SmallestMinGB=0)

GenericPlatformMemory.cpp#L314 limits the “detected” memory to smallest of physical memory and addressable memory, what relies on platform address limit being set correctly. Which is done for Windows and Mac in a similar way:

MemoryConstants.AddressLimit = FPlatformMath::RoundUpToPowerOfTwo64(MemoryConstants.TotalPhysical);

But for there’s no such code for Unix (and Linux does not redefine the behaviour), so it defaults to 2^32+1 set here. Even Android has correct handing of 32-bit vs 64-bit addressing. It seems that Linux-related code assumes 32-bit addressing even on 64-bit target.

Welcome to unreal engine forums.

There is a pull request in the official repository which fixes this issue(link) You can add that change to your 4.27.2 branch or any other.
I applied that patch to my ue5 editor and there is a lot of improvement in performance and memory usage. Thanks a lot for pointing this out.