[Scummvm-devel] TOON memory usage

Marcus Comstedt marcus at mc.pp.se
Thu Jul 21 13:40:38 CEST 2011


Hi David,

D G Turner <d.g.turner at ntlworld.com> writes:

> If you could confirm first whether this has reduced the memory usage
> enough to solve the DC issues with this?

Nope, still out of memory.  I get to the first screen (with three
roads) now, but after walking around a little on that first screen I
run out of memory (I don't know why the memory footprint increases
just by walking around, maybe it loads new images of the avatar into
memory?).

I think Torbjörn's idea about a dynamic heap size is rather good.
Also, I wonder if the _gridTemp array really needs to be int32.  The
values from this array are used as weights in the heap, and the weight
field in the heap is int16, so if that's enough for the weights it
should be enough for the _gridTemp as well.  (Both could be made
unsigned, by the way, because the weights used are always
non-negative.)

Anyway, I got so annoyed that element 0 in the heap _data array is
wasted (don't waste memory, people! ;) that I pushed a fix for that...


  // Marcus






More information about the Scummvm-devel mailing list