File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ unsafe impl<const ORDER: usize> GlobalAlloc for LockedHeap<ORDER> {
274
274
/// Create a locked heap:
275
275
/// ```
276
276
/// use buddy_system_allocator::*;
277
- /// let heap = LockedHeapWithRescue::new(|heap: &mut Heap<32>| {});
277
+ /// let heap = LockedHeapWithRescue::new(|heap: &mut Heap<32>, layout: &core::alloc::Layout | {});
278
278
/// ```
279
279
///
280
280
/// Before oom, the allocator will try to call rescue function and try for one more time.
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ fn test_heap_oom() {
77
77
#[ test]
78
78
fn test_heap_oom_rescue ( ) {
79
79
static mut SPACE : [ usize ; 100 ] = [ 0 ; 100 ] ;
80
- let heap = LockedHeapWithRescue :: new ( |heap : & mut Heap < 32 > | unsafe {
80
+ let heap = LockedHeapWithRescue :: new ( |heap : & mut Heap < 32 > , _layout : & Layout | unsafe {
81
81
heap. add_to_heap ( SPACE . as_ptr ( ) as usize , SPACE . as_ptr ( ) . add ( 100 ) as usize ) ;
82
82
} ) ;
83
83
You can’t perform that action at this time.
0 commit comments