Add large address aware flag
This allows the final exe to use more than 2gb of RAM in a 64-bit system which should get rid of most out of memory errors on 32-bit builds
LAA has been tested in moe mansion for a while now and it is known to significantly reduce the number of OOM errors that users experience
Merge request reports
Activity
The out of memory error we commonly see also occurs on vanilla 1.3 and is not Moe specific. It is triggered more often when you load a lot of addons. It happens due to memory fragmentation, and not being able to allocate a large enough buffer for software rendering when a given map requires a large amount of drawsegs.
The source problem is memory fragmentation, and realloc of drawsegs for maps that need a lot of them. It is fixed by having more memory available.
You could also optimize by modifying the realloc code to only alloc what it needs, since currently it just goes and grabs double what it currently has if it runs out. Also maybe somehow reducing memory fragmentation? I have no idea how to do that though.
I didn't figure out this stuff myself, it was a lot of investigation from Hannu actually.
Edited by AshnalMy +1 still stands because this is a good change regardless of circumstances.
Giving 32-bit builds one of the advantages that 64-bit already has is not a "hack" in my eyes. I would still want this in even if drawseg allocation is changed.
Edited by SalOkay, thanks Ashnal - that's a more comprehensive explanation than the original merge request gave. Minusone rescinded.
(I'm still very unnerved by the idea that memory fragmentation is a significant concern in this engine, though. Our Zone system is not favourable to fixing that, at least as it stands.)
Edited by toastermentioned in commit 0241b73d