[PATCH] D90201: Try reading a smaller chunk when (p)read fails
    Pavel Labath via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Oct 27 01:56:52 PDT 2020
    
    
  
labath added a comment.
There's also a similar piece of code in raw_ostream.cpp (raw_fd_ostream::write_impl), only it hard-limits the size to 2G everywhere, and additionally to 1G on linux. It would probably be a good idea to introduce a helper function for this functionality.
> this particular file happens to be the exact multiple of the page size (2628505600 bytes) in which case llvm prefers not to mmap (as to not waste a whole page for the terminating NULL byte).
Do we really need the terminating nul byte? It should be possible to avoid this behavior by passing RequiresNullTerminator=false to the relevant MemoryBuffer method...
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90201/new/
https://reviews.llvm.org/D90201
    
    
More information about the llvm-commits
mailing list