X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FBlock.h;h=ec894da02e9655fddc6cce3dde2c7877e994e87b;hb=2da67673279cf015ccc84270f6fd7935f64261a6;hp=112092c5c448eb3a0f38df85b35f30cdfa9e6109;hpb=fac738e582dcaca1575f5291c83910db01d25284;p=ghc-hetmet.git diff --git a/includes/Block.h b/includes/Block.h index 112092c..ec894da 100644 --- a/includes/Block.h +++ b/includes/Block.h @@ -54,6 +54,7 @@ typedef struct bdescr_ { union { struct bdescr_ *back; /* used (occasionally) for doubly-linked lists*/ StgWord *bitmap; + StgPtr scan; /* scan pointer for copying GC */ } u; unsigned int gen_no; /* generation */ struct step_ *step; /* step */ @@ -83,12 +84,16 @@ typedef struct bdescr_ { #define BF_LARGE 2 /* Block is pinned */ #define BF_PINNED 4 -/* Block is part of a compacted generation */ -#define BF_COMPACTED 8 +/* Block is to be marked, not copied */ +#define BF_MARKED 8 /* Block is free, and on the free list (TODO: is this used?) */ #define BF_FREE 16 /* Block is executable */ #define BF_EXEC 32 +/* Block contains only a small amount of live data */ +#define BF_FRAGMENTED 64 +/* we know about this block (for finding leaks) */ +#define BF_KNOWN 128 /* Finding the block descriptor for a given block -------------------------- */ @@ -253,5 +258,14 @@ round_to_mblocks(StgWord words) return words; } +INLINE_HEADER StgWord +round_up_to_mblocks(StgWord words) +{ + words += FIRST_BLOCK_OFF/sizeof(W_); + words = ((words / MBLOCK_SIZE_W) + 1) * MBLOCK_SIZE_W; + words -= FIRST_BLOCK_OFF/sizeof(W_); + return words; +} + #endif /* !CMINUSMINUS */ #endif /* BLOCK_H */