mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-03 08:51:43 +00:00
Use the machine-independent method of querying the page size.
llvm-svn: 14233
This commit is contained in:
parent
d3a8478981
commit
86cea2f60a
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user