forked from OSchip/llvm-project
parent
be6a9a151a
commit
c1fca9fb3a
|
@ -42,7 +42,12 @@ using namespace sys;
|
||||||
unsigned
|
unsigned
|
||||||
Process::GetPageSize()
|
Process::GetPageSize()
|
||||||
{
|
{
|
||||||
#if defined(HAVE_GETPAGESIZE)
|
#if defined(__CYGWIN__)
|
||||||
|
// On Cygwin, getpagesize() returns 64k but the page size for the purposes of
|
||||||
|
// memory protection and mmap() is 4k.
|
||||||
|
// See http://www.cygwin.com/ml/cygwin/2009-01/threads.html#00492
|
||||||
|
static const int page_size = 0x1000;
|
||||||
|
#elif defined(HAVE_GETPAGESIZE)
|
||||||
static const int page_size = ::getpagesize();
|
static const int page_size = ::getpagesize();
|
||||||
#elif defined(HAVE_SYSCONF)
|
#elif defined(HAVE_SYSCONF)
|
||||||
static long page_size = ::sysconf(_SC_PAGE_SIZE);
|
static long page_size = ::sysconf(_SC_PAGE_SIZE);
|
||||||
|
|
Loading…
Reference in New Issue