[ scummvm-Patches-629043 ] DIG: Experimental memory corruption fix

noreply at sourceforge.net noreply at sourceforge.net
Sat Oct 26 13:55:43 CEST 2002


Patches item #629043, was opened at 2002-10-26 13:55
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=629043&group_id=37116

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Torbjörn Andersson (eriktorbjorn)
Assigned to: Nobody/Anonymous (nobody)
Summary: DIG: Experimental memory corruption fix

Initial Comment:
This patch is experimental in two senses: First of all,
it's not very well tested, and secondly I'm sort of
hoping someone will tell me it's wrong and that there's
a much better way to do it.

The problem with the Dig memory corruption is, I think,
that whenever we use the mask buffer, we assume that it
has one strip for each strip in the room image (in the
case of the Dig's nexus room, that's more than 220),
yet we only allocate enough memory for the strips
visible on screen (typically 40), and we assume that's
also the mask buffer's pitch.

What this patch does is simply to always allocate
enough space for 240 strips in the mask buffer, and
change the pitch assumption, which means it will use
six times as much memory as before. In most cases, that
seems like an unnecessary waste of space to me, so I'd
really like to find a better way.

Note that even if this patch is rejected, there are
still some places in string.cpp and gfx.cpp where the
number of strips is hard-wired as 40. That, at least,
should be fixed.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=629043&group_id=37116




More information about the Scummvm-tracker mailing list