1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Support/Process: Add comments about PageSize and AllocationGranularity on Cygwin and Win32.

llvm-svn: 189940
This commit is contained in:
NAKAMURA Takumi 2013-09-04 14:12:26 +00:00
parent edaf5b018a
commit 102c898948
2 changed files with 4 additions and 2 deletions

View File

@ -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();

View File

@ -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);
}