Skip to content

Commit fa47af7

Browse files
committed
Enable overcommit test
1 parent 8149ec3 commit fa47af7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/vm/tests/mock_tests/mock_test_allocate_overcommit.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
// GITHUB-CI: MMTK_PLAN=NoGC
2+
13
use super::mock_test_prelude::*;
24

3-
use crate::util::alloc::allocator::{AllocationOptions, OnAllocationFail};
5+
use crate::util::alloc::allocator::AllocationOptions;
46
use crate::AllocationSemantics;
57

68
/// This test will do alloc_with_options in a loop, and evetually fill up the heap.
@@ -26,7 +28,8 @@ pub fn allocate_overcommit() {
2628
0,
2729
AllocationSemantics::Default,
2830
AllocationOptions {
29-
on_fail: OnAllocationFail::ReturnFailure,
31+
allow_overcommit: true,
32+
..Default::default()
3033
},
3134
);
3235
assert!(!last_result.is_zero());

src/vm/tests/mock_tests/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ mod mock_test_allocate_align_offset;
2727
mod mock_test_allocate_no_gc_oom_on_acquire;
2828
mod mock_test_allocate_no_gc_simple;
2929
mod mock_test_allocate_nonmoving;
30+
mod mock_test_allocate_overcommit;
3031
mod mock_test_allocate_with_disable_collection;
3132
mod mock_test_allocate_with_initialize_collection;
3233
mod mock_test_allocate_with_re_enable_collection;

0 commit comments

Comments
 (0)