<br>Submit 43912 looks pretty well. Common::List class <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CUsers%5Cajax%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CUsers%5Cajax%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cajax%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;
        mso-font-charset:1;
        mso-generic-font-family:roman;
        mso-font-format:other;
        mso-font-pitch:variable;
        mso-font-signature:0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;
        mso-font-charset:204;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:-520092929 1073786111 9 0 415 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-unhide:no;
        mso-style-qformat:yes;
        mso-style-parent:"";
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:10.0pt;
        margin-left:0cm;
        line-height:115%;
        mso-pagination:widow-orphan;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;
        mso-fareast-language:EN-US;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-default-props:yes;
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;
        mso-fareast-language:EN-US;}
.MsoPapDefault
        {mso-style-type:export-only;
        margin-bottom:10.0pt;
        line-height:115%;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><span style="" lang="EN-US">definitely</span> resolves memory issue (if i only had a chance to use it four years ago :) ).<br><br><div class="gmail_quote">On Mon, Sep 7, 2009 at 5:20 PM, Max Horn <span dir="ltr"><<a href="mailto:max@quendi.de">max@quendi.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Ping? Anybody able to test the change described below, so that it can<br>
be backported to the 1.0.0 branch ? Or are all SAGA memory problems<br>
resolved for the DS port anyway?<br>
<br>
Bye,<br>
Max<br>
<br>
Am 03.09.2009 um 20:57 schrieb Max Horn:<br>
<div><div></div><div class="h5"><br>
><br>
> Am 02.09.2009 um 21:33 schrieb Max Horn:<br>
><br>
>><br>
>> Am 16.08.2009 um 03:41 schrieb Neil Millstone:<br>
>> [...]<br>
>><br>
>>><br>
>>> I was looking at the Saga memory usage again today.  By poking<br>
>>> around<br>
>>> stack dumps when it crashed, I tracked down the ~200Kb alloc which<br>
>>> makes<br>
>>> the game crash to the path finder in Actor::fillPathArray().  This<br>
>>> function sometimes causes a 16384 element Common::Array of<br>
>>> PathDirectionData to be created while it is in operation.  This<br>
>>> comes to<br>
>>> 196608 bytes.<br>
>><br>
>> I commited a change (rev 43912) which changes the array to a queue<br>
>> (using Common::List instead of Common::Array), and now removes<br>
>> elements that are not needed anymore. While that has a somewhat<br>
>> higher<br>
>> overhead per element, the result is that the maximal size of the<br>
>> collection during the chess (intro) scene in ITE shrinks from over<br>
>> 10,000 down to 110-250. That *should* save another 100kb or so, but I<br>
>> didn't measure it precisely. Hopefully it helps anyway :).<br>
>><br>
>> Yay for basic computer science knowledge :). A pity so many coders<br>
>> (e.g. the original SAGA authors, it seems?) lack it or don't apply<br>
>> it :<br>
>> (.<br>
>><br>
><br>
> To clarify that: My change went only to trunk, and received only light<br>
> testing. Nevertheless I am convinced that it is save... So if somebody<br>
> could test it some more, it might be a good idea to backport it to the<br>
> branch.<br>
><br>
> Cheers,<br>
> Max<br>
><br>
> ------------------------------------------------------------------------------<br>
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008<br>
> 30-Day<br>
> trial. Simplify your report design, integration and deployment - and<br>
> focus on<br>
> what you do best, core application coding. Discover what's new with<br>
> Crystal Reports now.  <a href="http://p.sf.net/sfu/bobj-july" target="_blank">http://p.sf.net/sfu/bobj-july</a><br>
> _______________________________________________<br>
> Scummvm-devel mailing list<br>
> <a href="mailto:Scummvm-devel@lists.sourceforge.net">Scummvm-devel@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/scummvm-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/scummvm-devel</a><br>
><br>
<br>
<br>
------------------------------------------------------------------------------<br>
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day<br>
trial. Simplify your report design, integration and deployment - and focus on<br>
what you do best, core application coding. Discover what's new with<br>
Crystal Reports now.  <a href="http://p.sf.net/sfu/bobj-july" target="_blank">http://p.sf.net/sfu/bobj-july</a><br>
_______________________________________________<br>
Scummvm-devel mailing list<br>
<a href="mailto:Scummvm-devel@lists.sourceforge.net">Scummvm-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/scummvm-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/scummvm-devel</a><br>
</div></div></blockquote></div><br>