X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FBlockAlloc.h;h=32db94805a6830700837e17b6725e5d558f438ea;hb=53386c359c55bd6eaa13c35fe174c9274ff5888e;hp=ab6b199740d11578b2178c2c42deb347521f3489;hpb=7f309f1c021e7583f724cce599ce2dd3c439361b;p=ghc-hetmet.git diff --git a/ghc/rts/BlockAlloc.h b/ghc/rts/BlockAlloc.h index ab6b199..32db948 100644 --- a/ghc/rts/BlockAlloc.h +++ b/ghc/rts/BlockAlloc.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: BlockAlloc.h,v 1.5 1999/02/05 16:02:36 simonm Exp $ + * $Id: BlockAlloc.h,v 1.10 2003/11/12 17:49:06 sof Exp $ * * (c) The GHC Team, 1998-1999 * @@ -24,21 +24,11 @@ extern bdescr *allocBlock(void); extern void freeGroup(bdescr *p); extern void freeChain(bdescr *p); -/* Finding the block descriptor for a given block -------------------------- */ - -static inline bdescr *Bdescr(StgPtr p) -{ - return (bdescr *) - ((((W_)p & MBLOCK_MASK & ~BLOCK_MASK) >> (BLOCK_SHIFT-BDESCR_SHIFT)) - | ((W_)p & ~MBLOCK_MASK) - ); -} - /* Round a value to megablocks --------------------------------------------- */ #define WORDS_PER_MBLOCK (BLOCKS_PER_MBLOCK * BLOCK_SIZE_W) -static inline nat +INLINE_HEADER nat round_to_mblocks(nat words) { if (words > WORDS_PER_MBLOCK) { @@ -58,4 +48,4 @@ extern void checkFreeListSanity(void); nat countFreeList(void); #endif -#endif BLOCK_ALLOC_H +#endif /* BLOCK_ALLOC_H */