kho_block_set_shrink(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… kho_block_set_shrink(9) πŸ’…

okay so welcome to the Kernel API Manual, bestie πŸ’– this page is about kho_block_set_shrink, and it is literally the β€œshrink the block set to accommodate the target count” girly. no cap, it’s giving cleanup era ✨

✨ NAME ✨

kho_block_set_shrink β€” shrink the block set to accommodate the target count. periodt. πŸ’…

🌸 SYNOPSIS 🌸

the synopsis is exactly this, character for character:

void kho_block_set_shrink (struct kho_block_set *bs , u64 count );

πŸŽ€ ARGUMENTS πŸŽ€

  • bs β€” the block set. main character energy, honestly.
  • count β€” the target number of valid entries to accommodate. like, the number you’re trying to fit. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here’s the tea: kho_block_set_shrink releases and unallocates redundant preserved memory blocks. it also checks if the last block in the set can be removed because the remaining entry count is fully accommodated by the preceding blocks. so if the earlier blocks can fully hold what’s left, the last block can go bye-bye. slay πŸ’…

πŸ’€ NOTE πŸ’€

bestie, this is the part where you pay attention. it is the caller’s responsibility to ensure that entries are removed in the reverse order of their insertion. because shrinking destroys the last block in the set, removing entries in any other order would corrupt active data. 😭 not me being dramatic, but fr fr: reverse order only. periodt.

πŸ”’ CONTEXT πŸ”’

caller must hold a lock protecting the block set. that is not a suggestion, bestie β€” hold that lock. πŸ”

πŸ‘‘ SEE ALSO πŸ‘‘


and that’s the whole page, bestie 🫢 source/version: ./kernel/liveupdate; date: October 2026; page: kho_block_set_shrink(9). mwah πŸ’‹

πŸ“¦ where this page comes from