We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f60d909 commit 348d67bCopy full SHA for 348d67b
bench-cargo-miri/big-allocs/src/main.rs
@@ -7,7 +7,10 @@ fn main() {
7
// We can't use too big of an allocation or this code will encounter an allocation failure in
8
// CI. Since the allocation can't be huge, we need to do a few iterations so that the effect
9
// we're trying to measure is clearly visible above the interpreter's startup time.
10
- for _ in 0..10 {
+ // FIXME (https://github.com/rust-lang/miri/issues/4253): On 32bit targets, we can run out of
11
+ // usable addresses if we don't reuse, leading to random test failures.
12
+ let count = if cfg!(target_pointer_width = "32") { 8 } else { 12 };
13
+ for _ in 0..count {
14
drop(Vec::<u8>::with_capacity(512 * 1024 * 1024));
15
}
16
0 commit comments