[llvm-commits] CVS: llvm/lib/Support/SystemUtils.cpp
Misha Brukman
brukman at cs.uiuc.edu
Fri Jun 18 10:41:01 PDT 2004
Changes in directory llvm/lib/Support:
SystemUtils.cpp updated: 1.28 -> 1.29
---
Log message:
Use the machine-independent method of querying the page size.
---
Diffs of the changes: (+2 -1)
Index: llvm/lib/Support/SystemUtils.cpp
diff -u llvm/lib/Support/SystemUtils.cpp:1.28 llvm/lib/Support/SystemUtils.cpp:1.29
--- llvm/lib/Support/SystemUtils.cpp:1.28 Tue Jun 1 19:09:46 2004
+++ llvm/lib/Support/SystemUtils.cpp Fri Jun 18 10:34:07 2004
@@ -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 @@
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 */
More information about the llvm-commits
mailing list