Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: CM8000 Memory Leak

Author: John Merlino

Date: 14:10:28 02/18/01

Go up one level in this thread


On February 18, 2001 at 15:12:30, Elizabeth Schwartz wrote:

>I don't know if this was the case before the patch, but the patched version
>has a memory leak. I've been systematically working through the beginner
>tutorials (I'm up to the defense section) and switching to playing games -
>playing in the tournament room and analyzing them in the game room. Each time I
>switch into a room, memory goes up; each time I leave a room, memory drops but
>not all the way back. Each page of the tutorial seems to use 60k or so.
>
>I'm running Windows NT on a laptop with 256M ram. When I boot up, Windows uses
>about 64M. Eudora uses a steady 11-13M and Netscape has 10-12M with multiple
>windows open. RIght now after half an hour Chessmaster is using 30M and rising.
>It gets to the point where I get a message that I am running out of resources
>and should close some windows (I've NEVER seen that on Windows NT before) and
>Chessmaster is using over 100M.

I have verified that this is MOSTLY true. While Chessmaster has no control of
when Windows releases freed memory, there is definitely a leak in the tutorial
audio code (which, unfortunately, is potentially the most memory-intensive
portion of the program). It appears that each audio portion that is played is
allocated by Windows' memory manager, and then not freed when the audio finishes
playing (or is cancelled by the user). This starts to use up physical memory
(each piece of audio can take anywhere from a few dozen KB to several MB), and
then when physical memory is exhausted, the swapfile starts to fill up. I have
determined that ALL allocated memory is freed once Chessmaster is shut down.
Therefore, this problem can be avoided by not using the tutorials for a great
length of time. It is also POSSIBLE that playing Advice or Game Analysis audio
might cause the same problem, but I did not do any testing with those features.

However, from my testing, switching rooms will allocate memory ONLY if you go to
the room the first time. After you have been to a room once, going to it again
does not appear to increase the allocated memory that Chessmaster has used.

Once again, it should be noted that, even if Chessmaster DOES "free" memory,
WINDOWS might not actually free it up until much later, or possibly not until
Chessmaster is shut down. I do not know why this is, but it is easily seen
during testing.

I'll be sure the development team is told about the leak on Tuesday, and I'm
sure they'll be able to track it down. It MAY be a case of Windows just not
freeing memory when it should; I doubt it, though....

jm



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.