Project

General

Profile

Actions

Emulator Issues #6488

closed

Not all memory is freed on 64-bit

Added by plbl4ster over 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Other
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

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.

Actions #1

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?

Actions #2

Updated by magcius over 11 years ago

  • Status changed from Accepted to Fixed

Thanks for the patch, plbl4ster!

Actions

Also available in: Atom PDF