X-Git-Url: http://winboard.nl/cgi-bin?p=gnushogi.git;a=blobdiff_plain;f=gnushogi%2Fcommondsp.c;fp=gnushogi%2Fcommondsp.c;h=4cdc459f90152b784b4f07dea8e26272684e54c3;hp=e35698d4a69f876c00e5fb5e50d6458be09f0480;hb=148a53fde47be05f875928dc050b989198c5425c;hpb=a5dcd4c22b91b752f4d7c831318311f14125a29d diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index e35698d..4cdc459 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -1677,7 +1677,7 @@ InputCommand(char *command, int root) "shogi" #endif ); - printf("debug=1 setboard=0 sigint=0 done=1\n"); + printf("debug=1 setboard=0 sigint=0 memory=1 done=1\n"); } else if (strcmp(s, ".") == 0) { // periodic update request of analysis info: send stat01 info @@ -1711,6 +1711,17 @@ InputCommand(char *command, int root) { ok = true; } +#if ttblsz + else if (strcmp(s, "memory") == 0) + { + unsigned int mem, size, t = 1; + sscanf(sx, "memory %d", &mem); + if(mem > 2048) mem = 2048; /* prevent integer overflow for > 2GB hash */ + size = (mem << 20) / sizeof(struct hashentry) - rehash; + while(t <= size/4) t <<= 1; + AllocateTT(t); + } +#endif else if (strcmp(s, "go") == 0) { ok = true;