aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle
diff options
context:
space:
mode:
authorColin Snover2017-11-11 16:11:06 -0600
committerColin Snover2017-11-12 23:15:05 -0600
commita6659ba9d577998139cbb9a61532f823a24bc3b9 (patch)
treecccf6501b521fc8c20d3faf05ec1edbe2c711ea2 /engines/mortevielle
parent0eda63bed1b2d7fe0dba1360cad880b826248eaa (diff)
downloadscummvm-rg350-a6659ba9d577998139cbb9a61532f823a24bc3b9.tar.gz
scummvm-rg350-a6659ba9d577998139cbb9a61532f823a24bc3b9.tar.bz2
scummvm-rg350-a6659ba9d577998139cbb9a61532f823a24bc3b9.zip
DREAMWEB: Use accurate memory reclamation for Ex transfers
When the Ex memory regions are close to full, it is possible for the game to fail to purge objects and then crash with an OOM error even if it isn't actually out of memory. This patch calculates the amount of free memory truly needed when allocating to Ex memory to allow exactly the entire frame & text regions to be used, instead previously where a hard-coded amount of free space to maintain was used, which guaranteed that the entire memory region could not actually be used by the game. This change may be masking some underlying memory leak, or it may just be that near the end of the game the game naturally comes close to reaching the maximum memory region size. For the moment, I am assuming the latter. This commit also adds some assertion checks to the memory transfer functions to make sure the regions don't quietly overflow in other cases, since pickupConts performs transfers in a manner that doesn't ensure enough free memory exists for them to be successful. Fixes Trac#6820.
Diffstat (limited to 'engines/mortevielle')
0 files changed, 0 insertions, 0 deletions