[Scummvm-devel] SAGA memory savings Was: ScummVM 1.0.0: Release status 2009-08-11 -- Full feature, freeze

Andrew Kurushin ajax16384 at gmail.com
Thu Sep 10 21:05:07 CEST 2009


Submit 43912 looks pretty well. Common::List class definitely resolves
memory issue (if i only had a chance to use it four years ago :) ).

On Mon, Sep 7, 2009 at 5:20 PM, Max Horn <max at quendi.de> wrote:

> Ping? Anybody able to test the change described below, so that it can
> be backported to the 1.0.0 branch ? Or are all SAGA memory problems
> resolved for the DS port anyway?
>
> Bye,
> Max
>
> Am 03.09.2009 um 20:57 schrieb Max Horn:
>
> >
> > Am 02.09.2009 um 21:33 schrieb Max Horn:
> >
> >>
> >> 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 :
> >> (.
> >>
> >
> > To clarify that: My change went only to trunk, and received only light
> > testing. Nevertheless I am convinced that it is save... So if somebody
> > could test it some more, it might be a good idea to backport it to the
> > branch.
> >
> > Cheers,
> > Max
> >
> >
> ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > 30-Day
> > trial. Simplify your report design, integration and deployment - and
> > focus on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > Scummvm-devel mailing list
> > Scummvm-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/scummvm-devel
> >
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20090910/ac7eb569/attachment.html>


More information about the Scummvm-devel mailing list