summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2004-06-18 15:34:07 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2004-06-18 15:34:07 +0000
commit42a24823a16e4a627f45156903240424f43f04a3 (patch)
treebcde2dd5ed197525100d72c1aa2d5d7c12ffd70f /llvm/lib/Support/SystemUtils.cpp
parent5d87550ba704a2da711703a4ee106b967b7858c0 (diff)
downloadbcm5719-llvm-42a24823a16e4a627f45156903240424f43f04a3.tar.gz
bcm5719-llvm-42a24823a16e4a627f45156903240424f43f04a3.zip
Use the machine-independent method of querying the page size.
llvm-svn: 14233
Diffstat (limited to 'llvm/lib/Support/SystemUtils.cpp')
-rw-r--r--llvm/lib/Support/SystemUtils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/SystemUtils.cpp b/llvm/lib/Support/SystemUtils.cpp
index 076e3a7b933..f016db2b99d 100644
--- a/llvm/lib/Support/SystemUtils.cpp
+++ b/llvm/lib/Support/SystemUtils.cpp
@@ -17,6 +17,7 @@
#include "Config/sys/types.h"
#include "Config/sys/stat.h"
#include "Config/fcntl.h"
+#include "Config/pagesize.h"
#include "Config/sys/wait.h"
#include "Config/sys/mman.h"
#include "Config/unistd.h"
@@ -283,7 +284,7 @@ void *llvm::AllocateRWXMemory(unsigned NumBytes) {
return P;
#elif defined(HAVE_MMAP)
- static const long pageSize = sysconf(_SC_PAGESIZE);
+ static const long pageSize = GetPageSize();
unsigned NumPages = (NumBytes+pageSize-1)/pageSize;
/* FIXME: This should use the proper autoconf flags */
OpenPOWER on IntegriCloud