bob wrote:kiroje wrote:First of all a bug thanks to Robert Hyatt for Crafty 22.4
But there may be a memory leak of some sort
Im using SCID and Peter Skinners Win32 port of crafty for analysing my own games, but it seems that it steadily consumes more and more memory until Windows runs out
Im going back and forth in the games while crafty analyses, so maybe someone could do the same and see if they get the same problem ?
OK. I have now released the source for version 22.5.
The problem was not actually in Crafty, although I originally thought it might be. the new posix threads now defaults to "joinable" for the threads, where Crafty does not every join. Last time I used posix threads (at least a couple of years ago) the default was "detached" which means when a thread terminates the stack is not kept until the join is completed. This resulted in N "stacks" being kept for each search done, and the pthreads stacks are quite large. I have fixed this although as far as I am aware, this only applies to UNIX systems. This version sets the thread attribute correctly to solve this...
22.5 seems hopelessly broken for me. You shortened rook_open_file from a three dimensional array to a one dimensional array which contradicts data.c. Could you please update data.c?
In file included from crafty.c:13:
evaluate.c: In function ‘EvaluateRooks’:
evaluate.c

warning: unused variable ‘open_files’
In file included from crafty.c:27:
data.c: At top level:
data.c:905: error: conflicting types for ‘rook_open_file’
data.h:398: error: previous declaration of ‘rook_open_file’ was here
In file included from crafty.c:33:
init.c: In function ‘InitializePawnMasks’:
init.c:877: warning: unused variable ‘file’
init.c:877: warning: unused variable ‘k’
In file included from crafty.c:39:
option.c: In function ‘Option’:
option.c

warning: initialization makes integer from pointer without a cast
option.c

error: invalid operands to binary *
option.c

error: invalid operands to binary -
make[2]: *** [crafty.o] Error 1