[PATCH] D39444: [Support] Make the default chunk size of raw_fd_ostream to 1 GiB.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 19:43:47 PDT 2017
ruiu added inline comments.
================
Comment at: llvm/lib/Support/raw_ostream.cpp:581
-#ifndef LLVM_ON_WIN32
-#if defined(__linux__)
- bool ShouldWriteInChunks = true;
-#else
- bool ShouldWriteInChunks = false;
-#endif
-#else
+ // It is observed that Linux returns EINVAL for a very large write (>2G),
+ // so the default write size is limited to 1 GiB.
----------------
krytarowski wrote:
> Am I looking correctly that we enforce Linux behavior to every UNIX?
Yes. Compared to writing 1 GiB data, the overhead of system call is negligible, so I kept it simple.
https://reviews.llvm.org/D39444
More information about the llvm-commits
mailing list