ID:2693962
 
Resolved
BYOND is now compiled as large address aware, so it can in theory use closer to 4 GB than being limited to just under 2 GB as before.
Applies to:All
Status: Resolved (514.1558)

This issue has been resolved.
Background:

Under 32 OS, 32bit applications can only address 2.1gb of ram (effectively 31 bits), this is so the kernel can use the second half of the address space for its own stuff.

Under a 64 bit os, because the kernel is 64 bits, it can park its own stuff above the 32 bit line, meaning 32 bit applications can use all 32 bits of addressing space (4.2gb). Byond can use this on linux today, right now.

To deal with certain bugs in certain applications that assumed 2.1gbs of memory, Windows locked the upper half of memory space behind a flag set on the headers of the exe, called LargeAddressAware. (This is a flag that was used in 32bit windows for something called Physical Address Extension and the /3gb boot switch, creating confusing when googling it sometimes, but on 64 bit windows, it's just used to unlock the upper half of the 32 bit addressing range, and you do not need to enable unsupported boot modes to make use of it)

/tg/ testing:

After some testing, the issues that previously existed with LAA years ago don't anymore.

We disabled some of our memory management stuff and ran LAA on two of our 4 main servers (because its just a flag on the binary, and doesn't actually change the compiled output, you can manually apply it to binaries, this is the "4gb patch" anybody who has ever modded an old video game has likely used), and they have not crashed in 24 hours despite reaching above 2.1gb often (which they only reach because we disable the memory management stuff)

The meat of it:

I'm suggesting byond enable LAA on its windows builds. Bugs seem to be gone and Linux already has it, so this has to be supported one way or another.

This setting can be found in VS under project properties -> configuration properties (you should do this for both release and debug versions) -> linker -> system -> Enable Large Addresses.



Proof of DD being able to live right until it hits 3.7GB on 1557 after enabling LAA
This now runs on all our servers and has greatly reduced our crashes.
this seems like it would benefit a lot of people
In response to Alexkar598
Alexkar598 wrote:


Proof of DD being able to live right until it hits 3.7GB on 1557 after enabling LAA

about the same here. 3,566MB before crashing. give or take
Lummox JR resolved issue with message:
BYOND is now compiled as large address aware, so it can in theory use closer to 4 GB than being limited to just under 2 GB as before.