Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Nalimov's tablebases - memory leak

Author: Robert Hyatt

Date: 19:32:57 08/05/99

Go up one level in this thread


On August 05, 1999 at 19:23:16, Gerrit Reubold wrote:

>Hi Eugene, hi all,
>
>I have successfully included Nalimov's tablebases in my program, they are
>working great, thanks again for supplying them.
>
>However, I have a small problem with my implementation of Nalimov's probing
>code, it works fine, but I get memory leaks when exiting the program. The memory
>was allocated by "IInitializeTb(cPath)", is there a complementary function which
>I forgot to call on exit? I am using MSVC 6.0, if it helps, I can mail or post
>(parts of) the debug output.
>This is not a big problem, because it happens when exiting the program, but it
>would be nice to exit "clean".
>
>Has somebody the same problem? Is there a remedy?
>
>Thanks in advance,
>Gerrit

When a program exit()'s, there is _no_ requirement that memory that was
obtained via "malloc()" should be released.  The operating system should
be able to clean up after a program exits.  The only exceptions are memory
segments that are 'permanent' like those created via shmget().

The bug isn't in Eugene's code nor in yours...  The system you are running has
some sort of memory leak bug that needs a fix... and there probably is one
already as this would be a _serious_ problem...



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.