We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
cannot_alloc_max_usize_minus_some
1 parent dd8b212 commit ab0383fCopy full SHA for ab0383f
crates/rlsf/tests/global.rs
@@ -1,9 +1,6 @@
1
// Adopted from
2
// https://github.com/alexcrichton/dlmalloc-rs/blob/master/tests/global.rs
3
-use std::{
4
- alloc::{GlobalAlloc, Layout},
5
- collections::HashMap,
6
-};
+use std::collections::HashMap;
7
8
#[global_allocator]
9
#[cfg(any(all(target_arch = "wasm32", not(target_feature = "atomics")), unix))]
@@ -55,15 +52,3 @@ fn test_larger_than_word_alignment() {
55
52
}
56
53
57
54
58
-
59
-#[test]
60
-fn cannot_alloc_max_usize_minus_some() {
61
- // The test should complete without causing OOM
62
- for offset in (0..64).step_by(8) {
63
- let layout = Layout::from_size_align(usize::MAX - offset, 1).unwrap();
64
- for _ in 0..1000000 {
65
- let result = unsafe { A.alloc(layout) };
66
- assert!(result.is_null());
67
- }
68
69
-}
0 commit comments