diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2004-06-18 15:34:07 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2004-06-18 15:34:07 +0000 |
commit | 42a24823a16e4a627f45156903240424f43f04a3 (patch) | |
tree | bcde2dd5ed197525100d72c1aa2d5d7c12ffd70f /llvm/lib/Support/SystemUtils.cpp | |
parent | 5d87550ba704a2da711703a4ee106b967b7858c0 (diff) | |
download | bcm5719-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.cpp | 3 |
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 */ |