summaryrefslogtreecommitdiff
path: root/rts/sm/OSMem.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-01-30 10:05:19 -0500
committerBen Gamari <ben@smart-cactus.org>2019-01-30 10:05:19 -0500
commit172a59335fa6c76b17fb6795e87fbc7fcfd198e6 (patch)
tree6e5e940cb2c6ae9110807fa0d637a280c63b4220 /rts/sm/OSMem.h
parent76c8fd674435a652c75a96c85abbf26f1f221876 (diff)
downloadhaskell-172a59335fa6c76b17fb6795e87fbc7fcfd198e6.tar.gz
Revert "Batch merge"
This reverts commit 76c8fd674435a652c75a96c85abbf26f1f221876.
Diffstat (limited to 'rts/sm/OSMem.h')
-rw-r--r--rts/sm/OSMem.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/rts/sm/OSMem.h b/rts/sm/OSMem.h
index ea123e80c6..7dd0efdc23 100644
--- a/rts/sm/OSMem.h
+++ b/rts/sm/OSMem.h
@@ -32,16 +32,10 @@ roundDownToPage (size_t x)
}
INLINE_HEADER size_t
-roundUpToAlign (size_t size, size_t align)
-{
- /* alignment must always be a power of 2 */
- return (size + align - 1) & ~(align - 1);
-}
-
-INLINE_HEADER size_t
roundUpToPage (size_t x)
{
- return roundUpToAlign(x, getPageSize());
+ size_t size = getPageSize();
+ return ((x + size - 1) & ~(size - 1));
}