mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-19 17:24:57 +00:00
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
This commit is contained in:
@@ -88,8 +88,8 @@ TimeValue self_process::get_system_time() const {
|
|||||||
return getRUsageTimes().second;
|
return getRUsageTimes().second;
|
||||||
}
|
}
|
||||||
|
|
||||||
// On Cygwin, getpagesize() returns 64k and offset in mmap(3) should be
|
// On Cygwin, getpagesize() returns 64k(AllocationGranularity) and
|
||||||
// aligned to its pagesize.
|
// offset in mmap(3) should be aligned to the AllocationGranularity.
|
||||||
static unsigned getPageSize() {
|
static unsigned getPageSize() {
|
||||||
#if defined(HAVE_GETPAGESIZE)
|
#if defined(HAVE_GETPAGESIZE)
|
||||||
const int page_size = ::getpagesize();
|
const int page_size = ::getpagesize();
|
||||||
|
@@ -83,6 +83,8 @@ static unsigned getPageSize() {
|
|||||||
// that LLVM ought to run as 64-bits on a 64-bit system, anyway.
|
// that LLVM ought to run as 64-bits on a 64-bit system, anyway.
|
||||||
SYSTEM_INFO info;
|
SYSTEM_INFO info;
|
||||||
GetSystemInfo(&info);
|
GetSystemInfo(&info);
|
||||||
|
// FIXME: FileOffset in MapViewOfFile() should be aligned to not dwPageSize,
|
||||||
|
// but dwAllocationGranularity.
|
||||||
return static_cast<unsigned>(info.dwPageSize);
|
return static_cast<unsigned>(info.dwPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user