don't shrink the stack smaller than the value set by +RTS -k<size>
[ghc-hetmet.git] / includes / Block.h
index 28e0374..ec894da 100644 (file)
@@ -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 */