Bug fix in the new HscMain code.
[ghc-hetmet.git] / ghc / rts / Arena.c
index 5043f45..76ac23c 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
 /* -----------------------------------------------------------------------------
-   $Id: Arena.c,v 1.5 2003/02/18 05:40:20 sof Exp $ 
    (c) The University of Glasgow 2001
 
    Arena allocation.  Arenas provide fast memory allocation at the
    (c) The University of Glasgow 2001
 
    Arena allocation.  Arenas provide fast memory allocation at the
    which most allocations are small.
    -------------------------------------------------------------------------- */
 
    which most allocations are small.
    -------------------------------------------------------------------------- */
 
-#include <stdlib.h>
 #include "Rts.h"
 #include "RtsUtils.h"
 #include "BlockAlloc.h"
 #include "Arena.h"
 
 #include "Rts.h"
 #include "RtsUtils.h"
 #include "BlockAlloc.h"
 #include "Arena.h"
 
+#include <stdlib.h>
+
 // Each arena struct is allocated using malloc().
 struct _Arena {
     bdescr *current;
 // Each arena struct is allocated using malloc().
 struct _Arena {
     bdescr *current;
@@ -109,7 +109,7 @@ arenaFree( Arena *arena )
        ASSERT(arena_blocks >= 0);
        freeGroup(bd);
     }
        ASSERT(arena_blocks >= 0);
        freeGroup(bd);
     }
-    free(arena);
+    stgFree(arena);
 }
 
 unsigned long
 }
 
 unsigned long