/* -----------------------------------------------------------------------------
- * $Id: Block.h,v 1.18 2005/02/10 13:02:00 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
StgWord *bitmap;
} u;
unsigned int gen_no; /* generation */
- struct _step *step; /* step */
+ struct step_ *step; /* step */
StgWord32 blocks; /* no. of blocks (if grp head, 0 otherwise) */
StgWord32 flags; /* block is in to-space */
#if SIZEOF_VOID_P == 8
#define BF_PINNED 4
/* Block is part of a compacted generation */
#define BF_COMPACTED 8
+/* Block is free, and on the free list */
+#define BF_FREE 16
/* Finding the block descriptor for a given block -------------------------- */
#ifndef CMINUSMINUS
-// to the end...
+/* to the end... */
/* Double-linked block lists: --------------------------------------------- */
/* Allocation -------------------------------------------------------------- */
-extern bdescr *allocGroup(nat n);
-extern bdescr *allocBlock(void);
+bdescr *allocGroup(nat n);
+bdescr *allocBlock(void);
+
+// versions that take the storage manager lock for you:
+bdescr *allocGroup_lock(nat n);
+bdescr *allocBlock_lock(void);
/* De-Allocation ----------------------------------------------------------- */
-extern void freeGroup(bdescr *p);
-extern void freeChain(bdescr *p);
+void freeGroup(bdescr *p);
+void freeChain(bdescr *p);
+
+// versions that take the storage manager lock for you:
+void freeGroup_lock(bdescr *p);
+void freeChain_lock(bdescr *p);
/* Round a value to megablocks --------------------------------------------- */