On Thu, 2009-02-26 at 20:58 +0100, Pascal Georges wrote:
> in file 
> src/cutil.c
> you can set logMemory to 1. Then run Scid (output into a log file) and
> your favorite functions and you can use
> pocket/checkmemlog.tcl
> to check if some memory is unfreed. Maybe you will have trouble with
> those tools but they helped me some time ago.

Hm.... this logMemory thing works for WinCE only.
I was already slightly curious whether you did overload new[] and
delete[] operators somehow...

So some work left to get this going for other systems (and a lot of
files to touch :-( ).

> 
> I wrote those utilities to make sure there were no memory leaks on
> Pocket PC, but be aware that some part of Scid leaks memory (on PC) on
> purpose for efficiency.

Efficiency of what?
I can imagine that you keep memory to avoid fragmentation (but in that
case keep the pointer to the store as well, for later reuse; the ones I
mention are lost automatics) and it may be interesting in view of
performance to forget about smaller linked lists (but here it is just
bulk that is cheap to delete).

I am not sure whether you disabled all spelling corrections for WinCE
(most of it, at least), so you may not have noticed this leak.
I guess it has been there since the player life span checking has been
added, which could indeed be something that was done at "later" stage.

Cheers,
Joost.

> 
> Pascal
> 
> 2009/2/26 Joost ´t Hart <[email protected]>
>         Hi,
>         
>         I think I spotted a memory leak in the spelling correction
>         code.
>         
>         For the mapping of the new name id's and the life span
>         checking, three
>         arrays are allocated, of which only the id list is properly
>         freed before
>         the operation terminates. The date lists are not.
>         
>         For a reasonably big database (of let's say 100.000 player
>         names), this
>         would eat about 800KB of heap space per correction run.
>         
>         Anyone suspected something in this area before?
>         
>         Joost.
>         
>         
>         
> ------------------------------------------------------------------------------
>         Open Source Business Conference (OSBC), March 24-25, 2009, San
>         Francisco, CA
>         -OSBC tackles the biggest issue in open source: Open Sourcing
>         the Enterprise
>         -Strategies to boost innovation and cut costs with open source
>         participation
>         -Receive a $600 discount off the registration fee with the
>         source code: SFAD
>         http://p.sf.net/sfu/XcvMzF8H
>         _______________________________________________
>         Scid-users mailing list
>         [email protected]
>         https://lists.sourceforge.net/lists/listinfo/scid-users
>         
> 
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________ Scid-users mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/scid-users


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Scid-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scid-users

Reply via email to