[llvm] [llvm-strings] Use small buffer instead of reading whole file (PR #163073)
Harald van Dijk via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 03:42:00 PDT 2026
hvdijk wrote:
> I think I miss something but I try
>[...]
> and do ./build/bin/llvm-strings ./bolt/CMakeLists.txt and assertion failed.
This is because `bolt/CMakeLists.txt` is a small file. Per `llvm/lib/Support/MemoryBuffer.cpp`'s `shouldUseMmap`, `mmap` is not used for files that are under 16 kB (or files that are under the page size). `bolt/CMakeLists.txt` is about 8 kB. Your original test was a 1 GB file, you should see `mmap` used for that.
https://github.com/llvm/llvm-project/pull/163073
More information about the llvm-commits
mailing list