/* -----------------------------------------------------------------------------
- * $Id: RtsUtils.c,v 1.32 2003/03/25 17:58:49 sof Exp $
+ * $Id: RtsUtils.c,v 1.33 2003/03/31 19:19:34 sof Exp $
*
* (c) The GHC Team, 1998-2002
*
}
void *
-stgMallocWords (int n, char *msg)
-{
- return(stgMallocBytes(n * sizeof(W_), msg));
-}
-
-void *
-stgReallocWords (void *p, int n, char *msg)
-{
- return(stgReallocBytes(p, n * sizeof(W_), msg));
-}
-
-void *
stgCallocBytes (int n, int m, char *msg)
{
int i;
/* -----------------------------------------------------------------------------
- * $Id: RtsUtils.h,v 1.15 2003/03/25 17:58:50 sof Exp $
+ * $Id: RtsUtils.h,v 1.16 2003/03/31 19:19:34 sof Exp $
*
* (c) The GHC Team, 1998-1999
*
*
* ---------------------------------------------------------------------------*/
+/* (Checked) dynamic allocation: */
extern void *stgMallocBytes(int n, char *msg);
-extern void *stgMallocWords(int n, char *msg);
extern void *stgReallocBytes(void *p, int n, char *msg);
-extern void *stgReallocWords(void *p, int n, char *msg);
extern void *stgCallocBytes(int n, int m, char *msg);
extern void stgFree(void* p);
/* -----------------------------------------------------------------------------
- * $Id: Stable.c,v 1.24 2003/01/28 17:05:43 simonmar Exp $
+ * $Id: Stable.c,v 1.25 2003/03/31 19:19:34 sof Exp $
*
* (c) The GHC Team, 1998-2002
*
if (SPT_size == 0) {
// 1st time
SPT_size = INIT_SPT_SIZE;
- stable_ptr_table = stgMallocWords(SPT_size * sizeof(snEntry),
- "initStablePtrTable");
+ stable_ptr_table = stgMallocBytes(SPT_size * sizeof(snEntry),
+ "enlargeStablePtrTable");
/* we don't use index 0 in the stable name table, because that
* would conflict with the hash table lookup operations which
// 2nd and subsequent times
SPT_size *= 2;
stable_ptr_table =
- stgReallocWords(stable_ptr_table, SPT_size * sizeof(snEntry),
+ stgReallocBytes(stable_ptr_table,
+ SPT_size * sizeof(snEntry),
"enlargeStablePtrTable");
-
+
initFreeList(stable_ptr_table + old_SPT_size, old_SPT_size, NULL);
}
}