mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
MemoryBuffer.cpp: Consider if PageSize were not 4096 in shouldUseMmap(). Follow-up to r188903.
The AllocationGranularity can be 65536 on Win32, even on Cygwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188998 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f6db942564
commit
378cd84adf
@ -276,7 +276,7 @@ static bool shouldUseMmap(int FD,
|
||||
int PageSize) {
|
||||
// We don't use mmap for small files because this can severely fragment our
|
||||
// address space.
|
||||
if (MapSize < 4096*4)
|
||||
if (MapSize < 4 * 4096 || MapSize < (unsigned)PageSize)
|
||||
return false;
|
||||
|
||||
if (!RequiresNullTerminator)
|
||||
|
Loading…
Reference in New Issue
Block a user