pub(super) fn init() {
    const MACHINE_ALIGN: usize = core::mem::size_of::<usize>();
    const HEAP_BLOCK: usize = HV_HEAP_SIZE / MACHINE_ALIGN;
    static mut HEAP: [usize; HEAP_BLOCK] = [0; HEAP_BLOCK];
    let heap_start = unsafe { HEAP.as_ptr() as usize };
    unsafe {
        HEAP_ALLOCATOR
            .lock()
            .init(heap_start, HEAP_BLOCK * MACHINE_ALIGN);
    }
    info!(
        "Heap allocator init end: {:#x?}",
        heap_start..heap_start + HV_HEAP_SIZE
    );
}
/// Initialize the global heap allocator.
Initialize the global heap allocator.
Initialize the global heap allocator .
pub(super) fn init() {
    const MACHINE_ALIGN: usize = core::mem::size_of::<usize>();
    const HEAP_BLOCK: usize = HV_HEAP_SIZE / MACHINE_ALIGN;
    static mut HEAP: [usize; HEAP_BLOCK] = [0; HEAP_BLOCK];
    let heap_start = unsafe { HEAP.as_ptr() as usize };
    unsafe {
        HEAP_ALLOCATOR
            .lock()
            .init(heap_start, HEAP_BLOCK * MACHINE_ALIGN);
    }
    info!(
        "Heap allocator init end: {:#x?}",
        heap_start..heap_start + HV_HEAP_SIZE
    );
}
pub ( super ) fn init ( ) { const MACHINE_ALIGN : usize = core :: mem :: size_of :: < usize > ( ) ; const HEAP_BLOCK : usize = HV_HEAP_SIZE / MACHINE_ALIGN ; static mut HEAP : [ usize ; HEAP_BLOCK ] = [ 0 ; HEAP_BLOCK ] ; let heap_start = unsafe { HEAP . as_ptr ( ) as usize } ; unsafe { HEAP_ALLOCATOR . lock ( ) . init ( heap_start , HEAP_BLOCK * MACHINE_ALIGN ) ; } info ! ( " " heap_start heap_start HV_HEAP_SIZE ) ; }
Initialize the global heap allocator.
Initialize the global heap allocator .