X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FBlock.h;h=ec894da02e9655fddc6cce3dde2c7877e994e87b;hb=80637c9b178f54f1eb5352695463dad8ef3c7fc0;hp=28e03744925f68dd8c50f932c79e1a4e065b6191;hpb=43a120b706a5eece6624ca4907af89fc9a480c5e;p=ghc-hetmet.git diff --git a/includes/Block.h b/includes/Block.h index 28e0374..ec894da 100644 --- a/includes/Block.h +++ b/includes/Block.h @@ -258,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 */