kvfree(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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 use kfree or vfree if you are certain which one to use πŸ‘‘

πŸ¦‹ CONTEXT πŸ¦‹

context check πŸ‘€: either preemptible task context or not-NMI interrupt ✨

πŸ”₯ SEE ALSO πŸ”₯


cute sign-off πŸ’–: source ./mm Β· October 2026 Β· kvfree(9) β€” mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from