Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Nalimov's tablebases - memory leak

Author: Gerrit Reubold

Date: 12:35:32 08/06/99

Go up one level in this thread


On August 05, 1999 at 22:50:11, Dann Corbit wrote:

>On August 05, 1999 at 22:32:57, Robert Hyatt wrote:
>[snip]
>>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...
>Since he said he was using VC++ 6, he is on NT.  NT frees memory on exit().
>There are actually rare instances of operating systems that assume a user
>program frees all memory it has allocated.  But that is not the problem in this
>case.  He is probably using purify or electric fence or boundschecker or some
>such runtime analyzer which will barf at all memory segments allocated by the
>program but not explicitly freed.  I register an atexit() program when testing
>crafty for leaks.  It (currently) does not have any, nor does it do any memory
>over writes.

I am on NT (and Win95/98) and the code is working fine, the OS is releasing the
allocated memory. I should have made this explicit in my first post. However, I
would like to free the allocated memory myself, just a habit. Does anybody know
which variables of Eugene's probing code remain allocated when the program
exits? If I knew which pointers to free, I would do it myself.

Greetings,
Gerrit



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.