X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FBlockAlloc.h;h=1472ac6f76be5de28af1cf9f45c702ecc4ad3b6a;hb=28a464a75e14cece5db40f2765a29348273ff2d2;hp=d3e6d53a34694774f038ddd26218c9e1dd012996;hpb=438596897ebbe25a07e1c82085cfbc5bdb00f09e;p=ghc-hetmet.git diff --git a/ghc/rts/BlockAlloc.h b/ghc/rts/BlockAlloc.h index d3e6d53..1472ac6 100644 --- a/ghc/rts/BlockAlloc.h +++ b/ghc/rts/BlockAlloc.h @@ -1,5 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: BlockAlloc.h,v 1.2 1998/12/02 13:28:13 simonm Exp $ + * + * (c) The GHC Team, 1998-1999 * * Block Allocator Interface * @@ -8,34 +9,11 @@ #ifndef BLOCK_ALLOC_H #define BLOCK_ALLOC_H -/* Initialisation ---------------------------------------------------------- */ - -extern void initBlockAllocator(void); - -/* Allocation -------------------------------------------------------------- */ - -extern bdescr *allocGroup(nat n); -extern bdescr *allocBlock(void); - -/* De-Allocation ----------------------------------------------------------- */ - -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) - ); -} - /* Debugging -------------------------------------------------------------- */ #ifdef DEBUG extern void checkFreeListSanity(void); +nat countFreeList(void); #endif -#endif BLOCK_ALLOC_H +#endif /* BLOCK_ALLOC_H */