projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f6db942
)
MemoryBuffer.cpp: Consider if PageSize were not 4096 in shouldUseMmap(). Follow-up...
author
NAKAMURA Takumi
<geek4civic@gmail.com>
Thu, 22 Aug 2013 10:23:52 +0000
(10:23 +0000)
committer
NAKAMURA Takumi
<geek4civic@gmail.com>
Thu, 22 Aug 2013 10:23:52 +0000
(10:23 +0000)
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
lib/Support/MemoryBuffer.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/MemoryBuffer.cpp
b/lib/Support/MemoryBuffer.cpp
index cab45c736b51e5fe585d208a87aea26fb3809272..1c45c69ff3f5b6e2d568b7868615a1c06aa5dc0d 100644
(file)
--- a/
lib/Support/MemoryBuffer.cpp
+++ b/
lib/Support/MemoryBuffer.cpp
@@
-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 < 4
096*4
)
+ if (MapSize < 4
* 4096 || MapSize < (unsigned)PageSize
)
return false;
if (!RequiresNullTerminator)