summaryrefslogtreecommitdiff
path: root/rts/sm/OSMem.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-10-30 14:47:53 -0400
committerBen Gamari <ben@smart-cactus.org>2018-10-30 16:12:00 -0400
commit9cbf6f2baf793e361d41b9c36497c5601ff22253 (patch)
treea6fcb61e43f95c23d046301edf41a727959054ad /rts/sm/OSMem.h
parent7e1690d17b39a9491e46b12297adad8d0c89b550 (diff)
downloadhaskell-9cbf6f2baf793e361d41b9c36497c5601ff22253.tar.gz
Revert "Allocate bss section within proper range of other sections"
This reverts commit e019ec94f12268dd92ea5d5204e9e57e7ebf10ca. This sadly breaks the external interpreter on i386. For instance, see https://circleci.com/gh/ghc/ghc/10925.
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));
}