Skip to main content

init_heap

Function init_heap 

Source
pub fn init_heap(
    mapper: &mut impl Mapper<Size4KiB>,
    frame_allocator: &mut impl FrameAllocator<Size4KiB>,
) -> Result<(), MapToError<Size4KiB>>
Expand description

Initialize the heap

This function maps the heap memory region and initializes the global allocator.

§Arguments

  • mapper - The page table mapper
  • frame_allocator - The frame allocator

§Returns

  • Ok(()) on success
  • Err(MapToError) on failure