Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Getting rid of memory leaks using Nalimov's code

Author: Marcus Heidkamp

Date: 00:43:33 06/06/01

Go up one level in this thread


On June 05, 2001 at 12:13:03, Wayne Lowrance wrote:

>On June 05, 2001 at 10:39:29, Marcus Heidkamp wrote:
>
>>On June 05, 2001 at 08:41:07, Wayne Lowrance wrote:
>>
>>>What are nenirt leaks
>>>Thax
>>>Wayne
>>
>>Unless I did a serious mistype: I mean memory leaks. This happens whenever you
>>allocate memory in your program without explicitly freeing it after usage. The
>>memory menagement functions think this memory is still needed, so they will not
>>be allocated for other memory requests. Usually you should free all memory that
>>is no longer needed, so your program can allocate more dynamically.
>>
>>Marcus
>
>Marcus, I am a little shagrin. I guess I had my left hand over the keyboard
>wrong and was not looking at the monitor when I type, which is  the way in
>general I type.
>Anyway's thank you for the explanation.
>
>I find that if I run fritz for a very long time looking at one of my
>coorespondence games my computer at times locks up. I know the fritz programs
>have a reputation of bein memory hogs, but is this related ?
>
>Thx
>Wayne

Normally everything should be ok, even if you quit the program, the memory
should be released by the OS. But someone (namely the programmer) might want to
disable Nalimov's code completely while the program is still running, and needs
the memory back. That's what FCloseTB is good for. There is of course the
"cosmetics": I usually do not want to leave cleanup (of any kind) to the OS. Too
much bad experience with MS products... :-(


Regarding the Fritz question, I cannot tell. I could be that the memory woun't
get freed when you exit the engine an load a different one. I do not now, how
Chessbase handles that. But Nalimov's original code leave the cleanup for the OS
when the whole program exits...


Marcus




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.