X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FBlock.h;h=d1705ad68650afddb9451d415d6f3d3db1c9a0b8;hb=28a464a75e14cece5db40f2765a29348273ff2d2;hp=b5fc5ae67ef5de0a99767bc2fb5d65f9e21b10e8;hpb=693550d93040439ac20d7ab3bfcaee8ca5b7e923;p=ghc-hetmet.git diff --git a/ghc/includes/Block.h b/ghc/includes/Block.h index b5fc5ae..d1705ad 100644 --- 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 +/* Block is free, and on the free list */ +#define BF_FREE 16 /* Finding the block descriptor for a given block -------------------------- */ @@ -163,13 +165,21 @@ extern void initBlockAllocator(void); /* 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 --------------------------------------------- */