mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +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:
parent
81b135cc1e
commit
16eedf0ba0
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user