diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-08-21 13:47:12 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-08-21 13:47:12 +0000 |
commit | 8fea8f2d822a38daa5438a9be7938b3f93ac8da0 (patch) | |
tree | bd7704b2232daa918b7e34bc1686d079579b4ac9 /lib/Support/Unix | |
parent | 1a9f21abac47dcea0c62341b0ee4fd35481350b8 (diff) | |
download | external_llvm-8fea8f2d822a38daa5438a9be7938b3f93ac8da0.zip external_llvm-8fea8f2d822a38daa5438a9be7938b3f93ac8da0.tar.gz external_llvm-8fea8f2d822a38daa5438a9be7938b3f93ac8da0.tar.bz2 |
Unix/Process.inc: Revert r72332, "Work around a page size issue on Cygwin."
Offset in mmap(3) should be aligned to gepagesize(), 64k, or mmap(3) would fail.
TODO: Invetigate places where 4096 would be required as pagesize, or 4096 would satisfy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Unix')
-rw-r--r-- | lib/Support/Unix/Process.inc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Support/Unix/Process.inc b/lib/Support/Unix/Process.inc index 8bc8d91..cd244f6 100644 --- a/lib/Support/Unix/Process.inc +++ b/lib/Support/Unix/Process.inc @@ -88,13 +88,10 @@ TimeValue self_process::get_system_time() const { return getRUsageTimes().second; } +// On Cygwin, getpagesize() returns 64k and offset in mmap(3) should be +// aligned to its pagesize. static unsigned 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 - const int page_size = 0x1000; -#elif defined(HAVE_GETPAGESIZE) +#if defined(HAVE_GETPAGESIZE) const int page_size = ::getpagesize(); #elif defined(HAVE_SYSCONF) long page_size = ::sysconf(_SC_PAGE_SIZE); |