Emulator Issues #6488
closedNot all memory is freed on 64-bit
0%
Description
The code for freeing memory in MemArena doesn't free all memory on 64-bit. (The amount leaked is about 32MB for a GC game or 96MB for a Wii game.) In addition, this code is a pain to work with. I rewrote this part of the code. Patch is attached.
One problem with the current code is that it tries to duplicate the same conditional logic in 3 different places but written in 3 different ways which easily leads to bugs like these. Actually the code for freeing memory doesn't need to know if we're emulating GC or Wii on 32-bit or 64-bit. It doesn't need to assume relationship between certain fields in the table where the addresses are stored. The goal is to free each unique non-null address once.
Updated by delroth over 11 years ago
- Status changed from New to Accepted
- Issue type set to Other
- Priority set to Normal
- Operating system N/A added
Jasper, any way you could review this?
Updated by magcius over 11 years ago
- Status changed from Accepted to Fixed
Thanks for the patch, plbl4ster!