pub fn global_init(
start_vaddr: usize,
size: usize,
translator: &'static dyn AddrTranslator,
)Expand description
Initializes the global allocator with the given memory region.
Note that the memory region bounds are just numbers, and the allocator does not actually access the region. Users should ensure that the region is valid and not being used by others, so that the allocated memory is also valid.
This function should be called only once, and before any allocation.
ยงArguments
start_vaddr: The starting virtual address of the memory region.size: The size of the memory region in bytes.translator: The address translator for virtualization.