File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change 1
1
// Adopted from
2
2
// https://github.com/alexcrichton/dlmalloc-rs/blob/master/tests/global.rs
3
- use std:: {
4
- alloc:: { GlobalAlloc , Layout } ,
5
- collections:: HashMap ,
6
- } ;
3
+ use std:: collections:: HashMap ;
7
4
8
5
#[ global_allocator]
9
6
#[ 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
- }
You can’t perform that action at this time.
0 commit comments