projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
forkProcess(): watch out for ThreadRelocated
[ghc-hetmet.git]
/
ghc
/
includes
/
Block.h
diff --git
a/ghc/includes/Block.h
b/ghc/includes/Block.h
index
b5fc5ae
..
d1705ad
100644
(file)
--- a/
ghc/includes/Block.h
+++ b/
ghc/includes/Block.h
@@
-85,6
+85,8
@@
typedef struct bdescr_ {
#define BF_PINNED 4
/* Block is part of a compacted generation */
#define BF_COMPACTED 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 -------------------------- */
/* Finding the block descriptor for a given block -------------------------- */
@@
-163,13
+165,21
@@
extern void initBlockAllocator(void);
/* Allocation -------------------------------------------------------------- */
/* 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 ----------------------------------------------------------- */
/* 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 --------------------------------------------- */
/* Round a value to megablocks --------------------------------------------- */