kvfree(9)
π¦ kvfree(9) π¦
hii bestie!! welcome to the Kernel API Manual β this is the page for kvfree(9), and it's literally about freeing memory π
β¨
πΈ NAME πΈ
kvfree β free memory. that's the whole vibe. π«Ά
β¨ SYNOPSIS β¨
void kvfree (const void *addr );
π ARGUMENTS π
addrβ pointer to allocated memory. the thing you're sending to the void, bestie π³οΈβ¨
π DESCRIPTION π
okay so kvfree frees memory allocated by any of vmalloc, kmalloc or kvmalloc β all three, no cap π₯
it is slightly more efficient to use kfree or vfree if you are certain that you know which one to use. so if you already know your allocation came from kfree-land or vfree-land, use the matching one and it's a tiny bit more efficient π‘
bestie note: that's not me guessing β the page literally says it's slightly more efficient to usekfreeorvfreeif you are certain which one to use π
π¦ CONTEXT π¦
context check π: either preemptible task context or not-NMI interrupt β¨
π₯ SEE ALSO π₯
Kernel file ./mm/slub.cenum slab_flags(9)kmem_cache_alloc_node(9)kmem_cache_free(9)ksize(9)kfree(9)kvfree_atomic(9)kvfree_sensitive(9)kmem_cache_alloc_bulk(9)
cute sign-off π: source ./mm Β· October 2026 Β· kvfree(9) β mwah ππΈ
π¦ 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