diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-09-04 14:12:26 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-09-04 14:12:26 +0000 |
commit | 16eedf0ba03a751e98f4b57d528344c5fc83e6da (patch) | |
tree | eda9f3df1305780715499816671fcedacee4f021 /lib | |
parent | 81b135cc1e6578dba0fb6daed425f556db368034 (diff) | |
download | external_llvm-16eedf0ba03a751e98f4b57d528344c5fc83e6da.zip external_llvm-16eedf0ba03a751e98f4b57d528344c5fc83e6da.tar.gz external_llvm-16eedf0ba03a751e98f4b57d528344c5fc83e6da.tar.bz2 |
Support/Process: Add comments about PageSize and AllocationGranularity on Cygwin and Win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189940 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/Unix/Process.inc | 4 | ||||
-rw-r--r-- | lib/Support/Windows/Process.inc | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Support/Unix/Process.inc b/lib/Support/Unix/Process.inc index cd244f6..47d0a3c 100644 --- a/lib/Support/Unix/Process.inc +++ b/lib/Support/Unix/Process.inc @@ -88,8 +88,8 @@ 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. +// On Cygwin, getpagesize() returns 64k(AllocationGranularity) and +// offset in mmap(3) should be aligned to the AllocationGranularity. static unsigned getPageSize() { #if defined(HAVE_GETPAGESIZE) const int page_size = ::getpagesize(); diff --git a/lib/Support/Windows/Process.inc b/lib/Support/Windows/Process.inc index 38d5bc7..f840d06 100644 --- a/lib/Support/Windows/Process.inc +++ b/lib/Support/Windows/Process.inc @@ -83,6 +83,8 @@ static unsigned getPageSize() { // that LLVM ought to run as 64-bits on a 64-bit system, anyway. SYSTEM_INFO info; GetSystemInfo(&info); + // FIXME: FileOffset in MapViewOfFile() should be aligned to not dwPageSize, + // but dwAllocationGranularity. return static_cast<unsigned>(info.dwPageSize); } |