efi_free(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– efi_free(9) πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ this is the page for efi_free(9), and it’s literally about freeing memory pages. let’s get into it 🫢


πŸŽ€ NAME πŸŽ€

efi_free β€” free memory pages πŸ’…

🌸 SYNOPSIS 🌸

void efi_free (unsigned long size , unsigned long addr );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • size β€” size of the memory area to free in bytes, bestie πŸ“
  • addr β€” start of the memory area to free (must be EFI_PAGE_SIZE aligned) πŸ“

✨ DESCRIPTION ✨

okay so here’s the deal: size gets rounded up to a multiple of EFI_ALLOC_ALIGN, and EFI_ALLOC_ALIGN is an architecture specific multiple of EFI_PAGE_SIZE. no cap, that’s the whole rounding situation πŸŒ€

so this function should only be used to return pages allocated with efi_allocate_pages or efi_low_alloc_above β€” like, pls keep it to those allocated pages, that’s the vibe πŸ™ˆ

lowkey the big rule: addr must be EFI_PAGE_SIZE aligned, and this function should only be used to return pages allocated with efi_allocate_pages or efi_low_alloc_above πŸ’–

🌈 SEE ALSO 🌈


that’s the whole page, bestie β€” efi_free(9) signing off from ./drivers/firmware/efi/libstub, October 2026 πŸ’…βœ¨

πŸ“¦ where this page comes from