[commit: ghc] master: Fix caching of pagesize (2bc6efc)
git at git.haskell.org
git at git.haskell.org
Wed Oct 21 13:03:02 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/2bc6efc573d889a81dd28dcf00e0cbd7fafac1b7/ghc
>---------------------------------------------------------------
commit 2bc6efc573d889a81dd28dcf00e0cbd7fafac1b7
Author: Simon Marlow <marlowsd at gmail.com>
Date: Wed Oct 21 10:42:57 2015 +0100
Fix caching of pagesize
Summary: Spotted by @erikd
Test Plan: validate
Reviewers: austin, bgamari, erikd
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D1345
>---------------------------------------------------------------
2bc6efc573d889a81dd28dcf00e0cbd7fafac1b7
rts/Linker.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/rts/Linker.c b/rts/Linker.c
index 8e5ffa1..c40af2f 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -2233,10 +2233,9 @@ static StgWord getPageSize(void)
{
static StgWord pagesize = 0;
if (pagesize == 0) {
- return sysconf(_SC_PAGESIZE);
- } else {
- return pagesize;
+ pagesize = sysconf(_SC_PAGESIZE);
}
+ return pagesize;
}
static StgWord roundUpToPage (StgWord size)
More information about the ghc-commits
mailing list