summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-09-04 14:12:26 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-09-04 14:12:26 +0000
commit7a0423468e41b32a82791dd9a3f41aff1f8855cb (patch)
treea6f9bfae84e2721ef98b418baa01b8b18f65fbdc /llvm/lib
parent65fc51bbe29d39a0aae860dc4f1f9e75a800e221 (diff)
downloadbcm5719-llvm-7a0423468e41b32a82791dd9a3f41aff1f8855cb.tar.gz
bcm5719-llvm-7a0423468e41b32a82791dd9a3f41aff1f8855cb.zip
Support/Process: Add comments about PageSize and AllocationGranularity on Cygwin and Win32.
llvm-svn: 189940
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/Unix/Process.inc4
-rw-r--r--llvm/lib/Support/Windows/Process.inc2
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Support/Unix/Process.inc b/llvm/lib/Support/Unix/Process.inc
index cd244f69e74..47d0a3c794d 100644
--- a/llvm/lib/Support/Unix/Process.inc
+++ b/llvm/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/llvm/lib/Support/Windows/Process.inc b/llvm/lib/Support/Windows/Process.inc
index 38d5bc7e119..f840d064d8d 100644
--- a/llvm/lib/Support/Windows/Process.inc
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud