projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ed24ad
)
Use the machine-independent method of querying the page size.
author
Misha Brukman
<brukman+llvm@gmail.com>
Fri, 18 Jun 2004 15:34:07 +0000
(15:34 +0000)
committer
Misha Brukman
<brukman+llvm@gmail.com>
Fri, 18 Jun 2004 15:34:07 +0000
(15:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14233
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/SystemUtils.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/SystemUtils.cpp
b/lib/Support/SystemUtils.cpp
index 076e3a7b9330f112439bbef27d0286735dda117f..f016db2b99d9cd34683df35175bb154f99edeb04 100644
(file)
--- a/
lib/Support/SystemUtils.cpp
+++ b/
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 */