[Scummvm-devel] ScummVM 1.0.0: Release status 2009-08-11 -- Full feature, freeze
Max Horn
max at quendi.de
Wed Sep 2 21:33:28 CEST 2009
Am 16.08.2009 um 03:41 schrieb Neil Millstone:
[...]
>
> I was looking at the Saga memory usage again today. By poking around
> stack dumps when it crashed, I tracked down the ~200Kb alloc which
> makes
> the game crash to the path finder in Actor::fillPathArray(). This
> function sometimes causes a 16384 element Common::Array of
> PathDirectionData to be created while it is in operation. This
> comes to
> 196608 bytes.
I commited a change (rev 43912) which changes the array to a queue
(using Common::List instead of Common::Array), and now removes
elements that are not needed anymore. While that has a somewhat higher
overhead per element, the result is that the maximal size of the
collection during the chess (intro) scene in ITE shrinks from over
10,000 down to 110-250. That *should* save another 100kb or so, but I
didn't measure it precisely. Hopefully it helps anyway :).
Yay for basic computer science knowledge :). A pity so many coders
(e.g. the original SAGA authors, it seems?) lack it or don't apply it :
(.
Cheers,
Max
More information about the Scummvm-devel
mailing list