/*-----------------------------------------------------------------------------
- * $Id: Hash.c,v 1.6 2001/08/14 13:40:09 sewardj Exp $
+ * $Id: Hash.c,v 1.10 2003/03/25 17:58:47 sof Exp $
*
* (c) The AQUA Project, Glasgow University, 1995-1998
* (c) The GHC Team, 1999
#include "Hash.h"
#include "RtsUtils.h"
+#include <stdlib.h>
+#include <string.h>
+
#define HSEGSIZE 1024 /* Size of a single hash table segment */
/* Also the minimum size of a hash table */
#define HDIRSIZE 1024 /* Size of the segment directory */
table->dir[segment][index] = hl->next;
else
prev->next = hl->next;
+ freeHashList(hl);
table->kcount--;
return hl->data;
}
}
index--;
}
- free(table->dir[segment]);
+ stgFree(table->dir[segment]);
segment--;
index = HSEGSIZE - 1;
}
- free(table);
+ stgFree(table);
}
/* -----------------------------------------------------------------------------