
Crafty 22.5 leaking memory ?
Moderator: Ras
Re: 22.6 still leaks memory
Come on. This is at least 100+ elo better, as everybody can see. 

-
- Posts: 388
- Joined: Wed Mar 08, 2006 10:08 pm
Re: 22.6 still leaks memory
I verified that 22.7 fixes the memory leak.bob wrote:OK, I am violating my last rule which was to not release a new version until we are +20 over the last one. This one is only +10 better.CThinker wrote:This is from the 64-bit build by Peter. It is really easy to repro. The leak is 3MB on each new game!
You don't even have to run real games. Just type in the following.
Code: Select all
EPD Kit revision date: 1996.04.21 unable to open book file [./book.bin]. book is disabled unable to open book file [./books.bin]. Initializing multiple threads. System is SMP, not NUMA. Crafty v22.6 (1 cpus) White(1): xboard tellicsnoalias set 1 Crafty v22.6 (1 cpus) tellicsnoalias kibitz Hello from Crafty v22.6! (1 cpus) smpmt=2 new tellicsnoalias set 1 Crafty v22.6 (2 cpus) time 1000 easy go move Nf3 smpmt=2 new tellicsnoalias set 1 Crafty v22.6 (2 cpus) time 1000 easy go move Nf3 smpmt=2 new tellicsnoalias set 1 Crafty v22.6 (2 cpus) time 1000 easy go move Nf3
But it has what I hope is the last memory-leak issue resolved. I apparently missed this one in the NUMA support code that Eugene wrote a couple of years back. It is called for every "new" command (which starts a new game) and re-allocates the split blocks which causes the VM to grow slowly, game by game.
Consider this version (22.7) as a "test" version. If someone can compile it and check it under windows to see if the leak is gone, it would help. If there is another problem, I will probably fix it and re-release 22.7, otherwise I will move on to 22.8 for testing...
Btw, Bob, while you are at it, can you also please add one line in lock.h (to include the windows header)? Without this, compilation fails for Windows.
#if (CPUS > 1)
/*
*******************************************************************************
* *
* this is a Microsoft windows-based operating system. *
* *
*******************************************************************************
*/
# if defined(_WIN32) || defined(_WIN64)
# include <windows.h>
# define pthread_attr_t HANDLE
# define pthread_t HANDLE
# define thread_t HANDLE
extern pthread_t NumaStartThread(void *func, void *args);
-
- Posts: 415
- Joined: Fri Dec 15, 2006 9:46 pm
- Location: Philippines
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: 22.6 still leaks memory
I added it, but I am curious as to why no one else is complaining about this problem???
-
- Posts: 415
- Joined: Fri Dec 15, 2006 9:46 pm
- Location: Philippines
Re: 22.6 still leaks memory
Those who are chronic compilers of Crafty already knows about it. I even mentioned it here though:bob wrote:I added it, but I am curious as to why no one else is complaining about this problem???
http://www.talkchess.com/forum/viewtopic.php?t=25019
I learned it from Master Jim. Of all this Crafty posts, you might have omitted this thread Bob.
Thanks.
e-mail: computer.chess@hotmail.com
-
- Posts: 2186
- Joined: Fri Jul 14, 2006 7:56 am
- Location: London, England
- Full name: Jim Ablett
Re: 22.6 still leaks memory
Because my Windows 22.5/22.6 builds were compiled using Crafty's Unix thread code and don't suffer from this problem.bob wrote:I added it, but I am curious as to why no one else is complaining about this problem???
Jim.