[project @ 2003-09-21 22:20:51 by wolfgang]
[ghc-hetmet.git] / ghc / rts / Hash.c
index 05f2b19..1083b8a 100644 (file)
@@ -1,5 +1,5 @@
 /*-----------------------------------------------------------------------------
- * $Id: Hash.c,v 1.8 2002/04/09 12:55:11 simonmar 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
@@ -14,6 +14,9 @@
 #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 */
@@ -322,11 +325,11 @@ freeHashTable(HashTable *table, void (*freeDataFun)(void *) )
            }
            index--;
        }
-       free(table->dir[segment]);
+       stgFree(table->dir[segment]);
        segment--;
        index = HSEGSIZE - 1;
     }
-    free(table);
+    stgFree(table);
 }
 
 /* -----------------------------------------------------------------------------