1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Use the machine-independent method of querying the page size.

llvm-svn: 14233
This commit is contained in:
Misha Brukman 2004-06-18 15:34:07 +00:00
parent d3a8478981
commit 86cea2f60a

View File

@ -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 */