Skip to content
Snippets Groups Projects

Add large address aware flag

Merged himie requested to merge bird/Kart-Public:large-address-aware into master

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

Merged by SalSal 4 years ago (Jan 26, 2021 11:13pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Feels like a hack to accomodate for Moe's chronic memory leaks, not a genuine fix. I'm downvoting this because any memory issues need to be addressed at the source, not just getting a bigger bucket with which to leak into before you ruin the carpet anyways.

  • Developer

    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 Ashnal
  • My +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 Sal
  • Okay, 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 toaster
  • I'm not too familiar with the inner workings of memory management so thanks Ashnal for the better explanation.

  • merged

  • Sal mentioned in commit 0241b73d

    mentioned in commit 0241b73d

Please register or sign in to reply
Loading