X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRetainerSet.c;h=6f51cb014a574828e68fe1de4c64650b03a210d4;hb=7f5ad47f93198f4e0548c4ca5a7cb37f3dcbc060;hp=83e0d9feeec65449b4f71f2c93e5b1ff49c27882;hpb=dbef766ce79e37a74468a07a93b15ba1f06fe8f8;p=ghc-hetmet.git diff --git a/ghc/rts/RetainerSet.c b/ghc/rts/RetainerSet.c index 83e0d9f..6f51cb0 100644 --- a/ghc/rts/RetainerSet.c +++ b/ghc/rts/RetainerSet.c @@ -1,5 +1,4 @@ /* ----------------------------------------------------------------------------- - * $Id: RetainerSet.c,v 1.2 2001/11/26 16:54:21 simonmar Exp $ * * (c) The GHC Team, 2001 * Author: Sungwoo Park @@ -18,6 +17,7 @@ #include "Arena.h" #include "Profiling.h" +#include #include #define HASH_TABLE_SIZE 255 @@ -50,7 +50,7 @@ RetainerSet rs_MANY = { /* ----------------------------------------------------------------------------- * calculate the size of a RetainerSet structure * -------------------------------------------------------------------------- */ -static inline size_t +STATIC_INLINE size_t sizeofRetainerSet( int elems ) { return (sizeof(RetainerSet) + elems * sizeof(retainer)); @@ -146,7 +146,7 @@ addElement(retainer r, RetainerSet *rs) StgWord hk; // Hash Key #ifdef DEBUG_RETAINER - // fprintf(stderr, "addElement(%p, %p) = ", r, rs); + // debugBelch("addElement(%p, %p) = ", r, rs); #endif ASSERT(rs != NULL); @@ -186,7 +186,7 @@ addElement(retainer r, RetainerSet *rs) if (i < rs->num) continue; #ifdef DEBUG_RETAINER - // fprintf(stderr, "%p\n", nrs); + // debugBelch("%p\n", nrs); #endif // The set we are seeking already exists! return nrs; @@ -209,7 +209,7 @@ addElement(retainer r, RetainerSet *rs) hashTable[hash(hk)] = nrs; #ifdef DEBUG_RETAINER - // fprintf(stderr, "%p\n", nrs); + // debugBelch("%p\n", nrs); #endif return nrs; } @@ -491,7 +491,7 @@ outputAllRetainerSet(FILE *prof_file) fprintf(prof_file, "}\n"); } - free(rsArray); + stgFree(rsArray); } #endif // SECOND_APPROACH