-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[lld][MachO] Follow-up to use madvise() for threaded file page-in. #157917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
65e433c
59e77f5
298380e
e31984b
884b771
1b9b139
f5fef9b
80767a2
f2654ae
198d9b0
3dddb2a
41c3e61
be7af98
bdf8995
13dcdec
d4ebd0d
ba7dedc
c91dd39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -505,8 +505,10 @@ getOpenFileImpl(sys::fs::file_t FD, const Twine &Filename, uint64_t FileSize, | |
// On at least Linux, and possibly on other systems, mmap may return pages | ||
// from the page cache that are not properly filled with trailing zeroes, | ||
// if some prior user of the page wrote non-zero bytes. Detect this and | ||
// don't use mmap in that case. | ||
if (!RequiresNullTerminator || *Result->getBufferEnd() == '\0') | ||
// don't use mmap in that case (unless it is object or archive file). | ||
if (!RequiresNullTerminator || *Result->getBufferEnd() == '\0' || | ||
StringRef(Filename.str()).ends_with(".o") || | ||
StringRef(Filename.str()).ends_with(".a")) | ||
|
||
return std::move(Result); | ||
} | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.