diff -r -u chess-5.02/src/cmd.c chess-5.02+/src/cmd.c
--- chess-5.02/src/cmd.c	Sat Mar 24 05:28:41 2001
+++ chess-5.02+/src/cmd.c	Wed Dec 12 21:17:42 2001
@@ -309,7 +309,7 @@
    }
    else if (strcmp (cmd, "hashsize") == 0)
    {
-      i = atoi (inputstr);
+      i = atoi (subcmd);
       TTHashMask = 0;
       while ((i >>= 1) > 0)
       {
@@ -318,6 +318,18 @@
       }
       HashSize = TTHashMask + 1;
       printf ("Adjusting HashSize to %d slots\n", HashSize);
+      if (setting[0])
+      {
+	i = atoi (setting);
+	PHashMask = 0;
+	while ((i >>= 1) > 0)
+	  {
+	    PHashMask <<= 1;
+	    PHashMask |= 1;
+	  }
+	PawnSize = PHashMask + 1;
+	printf ("Adjusting PawnSize to %d slots\n", PawnSize);
+      }
       InitHashTable (); 
    }
    else if (strcmp (cmd, "null") == 0)
diff -r -u chess-5.02/src/common.h chess-5.02+/src/common.h
--- chess-5.02/src/common.h	Sat Mar 24 05:28:41 2001
+++ chess-5.02+/src/common.h	Sat Dec 15 11:08:24 2001
@@ -225,8 +225,11 @@
 #define MAXGAMEDEPTH  600
 
 
-#define HASHSLOTS 262144*6
-#define PAWNSLOTS 65536*6
+#define HASHSLOTS (8*1024*1024/(2*sizeof(HashSlot)))  // about   8 MB
+#define PAWNSLOTS (   512*1024/(2*sizeof(PawnSlot)))  // about 512 KB
+
+//#define HASHSLOTS 262144*6
+//#define PAWNSLOTS 65536*6
 //#define HASHSLOTS 32668/48
 //#define PAWNSLOTS 32668/48
 
@@ -321,6 +324,7 @@
 extern unsigned long GoodPawnHashCnt;
 extern unsigned long RepeatCnt;
 extern unsigned HashSize;
+extern unsigned PawnSize;
 extern unsigned long TTHashMask;
 extern unsigned long PHashMask;
 extern short slider[8];
diff -r -u chess-5.02/src/init.c chess-5.02+/src/init.c
--- chess-5.02/src/init.c	Sat Mar 24 05:28:42 2001
+++ chess-5.02+/src/init.c	Wed Dec 12 21:22:23 2001
@@ -812,6 +812,7 @@
       TTHashMask |= 1;
    }
    HashSize = TTHashMask + 1; 
+
    i = PAWNSLOTS;
    PHashMask = 0;
    while ((i>>=1) > 0)
@@ -819,6 +820,7 @@
       PHashMask <<= 1;
       PHashMask |= 1;
    }
+   PawnSize = PHashMask + 1;
 
    DebugPly = 99;
    DebugDepth = 0;
@@ -864,9 +866,7 @@
 void InitHashTable ()
 /****************************************************************************
  *
- *  Allocate memory for our transposition tables.  By default, the
- *  transposition table will have 16K entries; 8K for each color.
- *  Add code to allocated memory for pawn table as well.
+ *  Allocate memory for our transposition tables and pawn tables.
  *
  ****************************************************************************/
 {
@@ -886,16 +886,18 @@
 		HashSize>>10, size);
    }
 
-   PawnTab[0] = (PawnSlot *) calloc (PAWNSLOTS, sizeof (PawnSlot));
-   PawnTab[1] = (PawnSlot *) calloc (PAWNSLOTS, sizeof (PawnSlot));
+   free (PawnTab[0]);
+   free (PawnTab[1]);
+   PawnTab[0] = (PawnSlot *) calloc (PawnSize, sizeof (PawnSlot));
+   PawnTab[1] = (PawnSlot *) calloc (PawnSize, sizeof (PawnSlot));
    if (PawnTab[0] == NULL || PawnTab[1] == NULL)
       printf ("Not enough memory for pawn table\n");
    else
    {
-      size = (PAWNSLOTS * 2 * sizeof (PawnSlot)) >> 10;
+      size = (PawnSize * 2 * sizeof (PawnSlot)) >> 10;
       if (!(flags & XBOARD))
 	printf ("Pawn hash table: Entries=%dK Size=%dK\n",
-		PAWNSLOTS >> 10, size);
+		PawnSize >> 10, size);
    }
    return;
 }
diff -r -u chess-5.02/src/main.c chess-5.02+/src/main.c
--- chess-5.02/src/main.c	Sat Mar 24 05:28:42 2001
+++ chess-5.02+/src/main.c	Wed Dec 12 21:00:55 2001
@@ -119,6 +119,7 @@
 unsigned long GoodPawnHashCnt;
 unsigned long RepeatCnt;
 unsigned HashSize;
+unsigned PawnSize;
 unsigned long TTHashMask;
 unsigned long PHashMask;
 char SANmv[10];
diff -r -u chess-5.02/src/ttable.c chess-5.02+/src/ttable.c
--- chess-5.02/src/ttable.c	Sat Mar 24 05:28:42 2001
+++ chess-5.02+/src/ttable.c	Wed Dec 12 21:10:21 2001
@@ -177,10 +177,10 @@
 void PTClear ()
 /****************************************************************************
  *   
- *  Zero out the transposition table.
+ *  Zero out the pawn evaluation hash table.
  *
  ****************************************************************************/
 {
-   memset (PawnTab[white], 0, PAWNSLOTS * sizeof (PawnSlot));
-   memset (PawnTab[black], 0, PAWNSLOTS * sizeof (PawnSlot));
+   memset (PawnTab[white], 0, PawnSize * sizeof (PawnSlot));
+   memset (PawnTab[black], 0, PawnSize * sizeof (PawnSlot));
 }
diff -r -u chess-5.02/src/version.h chess-5.02+/src/version.h
--- chess-5.02/src/version.h	Sun Mar 25 05:35:17 2001
+++ chess-5.02+/src/version.h	Sat Dec 15 15:08:26 2001
@@ -24,5 +24,5 @@
      cracraft@ai.mit.edu, cracraft@stanfordalumni.org, cracraft@earthlink.net
 */
 #define PROGRAM	  "GNU Chess"
-#define VERSION   "v5.02"
+#define VERSION   "v5.02+"
 #define AUTHOR	  "Chua Kong Sian / Stuart Cracraft" 
diff -r -u chess-5.02/doc/README chess-5.02+/doc/README
--- chess-5.02/doc/README	Sun Mar 25 05:36:23 2001
+++ chess-5.02+/doc/README	Wed Dec 12 21:24:09 2001
@@ -250,7 +250,8 @@
 
 The general hash table size is controlled by the variable HASHSLOTS
 as defined in common.h. Likewise the pawn hash table size is controlled
-by the variable PAWNSLOTS in common.h.
+by the variable PAWNSLOTS in common.h.  The hashsize command can be used
+to change the sizes.
 
 Typically middle-game searches are sped up by 25%-50% by the general
 hash table and by much more in endgames where there are few pieces
@@ -622,8 +623,11 @@
 	on - enables using the memory hash table to speed search
 	off - disables the memory hash table
 
-  hashsize N
-	Sets the hash table to permit storage of N positions
+  hashsize N M
+	Sets the hash table to permit storage of N positions, and
+	sets the pawn table to permit storage of M pawn configurations.
+	M can be omitted, in which case the pawn table size will be
+	unchanged.
 
   null
 	on - enables using the null move heuristic to speed search
