summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Support/Unix/Process.inc4
-rw-r--r--lib/Support/Windows/Process.inc2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Support/Unix/Process.inc b/lib/Support/Unix/Process.inc
index cd244f69e7..47d0a3c794 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 38d5bc7e11..f840d064d8 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);
}