__sk_mem_reduce_allocated(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’Έ __sk_mem_reduce_allocated(9) πŸ’Έ

okay so bestie, welcome to the Kernel API Manual β€” we're doing a little memory accounting today and honestly it's giving bookkeeping-but-make-it-chaotic ✨


🌸 NAME 🌸

__sk_mem_reduce_allocated β€” reclaim memory_allocated

like, the whole job is give the memory back 🫢


πŸŽ€ SYNOPSIS πŸŽ€

void __sk_mem_reduce_allocated (struct sock *sk , int amount );

no cap, that's the whole signature. short and iconic πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • sk β€” socket. the little guy whose memory situation we're adjusting 🌈
  • amount β€” number of quanta. yes, quanta. plural of quantum. physics-adjacent. we love to see it ⭐

πŸ’œ DESCRIPTION πŸ’œ

Bestie, listen. This one is Similar to __sk_mem_reclaim, but β€” and this is the whole entire lore β€” it does not update sk_forward_alloc. That's it. That's the difference. The way that one missing update changes everything 😭

So if you were expecting sk_forward_alloc to get touched? It does not. Not here. Not today. Read the reclaim one for that, iykyk.

fr fr, don't assume this updates sk_forward_alloc β€” the manpage is so clear about it and we're not gonna pretend otherwise πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./net/core/sock.c β€” the source of truth, the main character πŸ’–


and that's the teardown, bestie πŸŽ€ this page lives in ./net/core and it's dated October 2026, from the Kernel API Manual β€” slay, periodt, go reduce some allocated memory πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from