pub unsafe fn init(reserved_end: VirtAddr) {
    assert!(ALLOCATOR.inner.lock().is_none());
    let heap = Heap::new(reserved_end);
    let max_end = heap.max_end();
    assert!(max_end.as_usize() < arch::TCB_START);
    assert!(max_end.as_usize() < arch::USER_START);
    *ALLOCATOR.inner.lock() = Some(heap);
}
/// Inits allocation. May only be called once.
Inits allocation. May only be called once.
Inits allocation . May only be called once .
pub unsafe fn init(reserved_end: VirtAddr) {
    assert!(ALLOCATOR.inner.lock().is_none());
    let heap = Heap::new(reserved_end);
    let max_end = heap.max_end();
    assert!(max_end.as_usize() < arch::TCB_START);
    assert!(max_end.as_usize() < arch::USER_START);
    *ALLOCATOR.inner.lock() = Some(heap);
}
pub unsafe fn init ( reserved_end : VirtAddr ) { assert ! ( ALLOCATOR inner lock ( ) is_none ( ) ) ; let heap = Heap :: new ( reserved_end ) ; let max_end = heap . max_end ( ) ; assert ! ( max_end as_usize ( ) arch TCB_START ) ; assert ! ( max_end as_usize ( ) arch USER_START ) ; * ALLOCATOR . inner . lock ( ) = Some ( heap ) ; }
Inits allocation.
Inits allocation .
reserved_end
VirtAddr
reserved_end
VirtAddr