summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crates/searcher/src/searcher/mmap.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/searcher/src/searcher/mmap.rs b/crates/searcher/src/searcher/mmap.rs
index 0ab2d53f..83fc4230 100644
--- a/crates/searcher/src/searcher/mmap.rs
+++ b/crates/searcher/src/searcher/mmap.rs
@@ -71,6 +71,16 @@ impl MmapChoice {
if !self.is_enabled() {
return None;
}
+ if !cfg!(target_pointer_width = "64") {
+ // For 32-bit systems, it looks like mmap will succeed even if it
+ // can't address the entire file. This seems to happen at least on
+ // Windows, even though it uses to work prior to ripgrep 13. The
+ // only Windows-related change in ripgrep 13, AFAIK, was statically
+ // linking vcruntime. So maybe that's related? But I'm not sure.
+ //
+ // See: https://github.com/BurntSushi/ripgrep/issues/1911
+ return None;
+ }
if cfg!(target_os = "macos") {
// I guess memory maps on macOS aren't great. Should re-evaluate.
return None;