efi_free(9)
π 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 beEFI_PAGE_SIZEaligned) π
β¨ 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:addrmust beEFI_PAGE_SIZEaligned, and this function should only be used to return pages allocated withefi_allocate_pagesorefi_low_alloc_aboveπ
π SEE ALSO π
- Kernel file
./drivers/firmware/efi/libstub/mem.cπ efi_get_memory_map(9)efi_allocate_pages(9)efi_low_alloc_above(9)
thatβs the whole page, bestie β efi_free(9) signing off from ./drivers/firmware/efi/libstub, October 2026 π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms