Module uefi::allocator

source ·
Expand description

This module implements Rust’s global allocator interface using UEFI’s memory allocation functions.

If the global_allocator feature is enabled, the Allocator will be used as the global Rust allocator.

§Usage

Call the init function with a reference to the boot services table. Failure to do so before calling a memory allocating function will panic.

Call the exit_boot_services function before exiting UEFI boot services. Failure to do so will turn subsequent allocation into undefined behaviour.

Structs§

  • Allocator which uses the UEFI pool allocation functions.

Functions§

  • Notify the allocator library that boot services are not safe to call anymore
  • init
    Initializes the allocator.