Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Nalimov's tablebases - memory leak

Author: Dann Corbit

Date: 19:50:11 08/05/99

Go up one level in this thread


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.





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.