allocate_mmap_buffer

Function allocate_mmap_buffer 

Source
fn allocate_mmap_buffer() -> Result<Vec<u8>, Status>
Expand description

Allocate a buffer to hold a copy of the memory map returned from ExitBootServices.

This seems to be the opposite of an exact science:

  • After boot services were exited, allocation is impossible.
  • The number of descriptors changes over time.

As a result, we now overallocate to hopefully have enough headroom to contain the memory map after exiting.