kfence_ksize(9)
okay bestie, this is the kfence_ksize(9) page from the Kernel API Manual, and it's literally here to spill the tea on KFENCE object sizes π«Άβ¨
πΈ NAME πΈ
kfence_ksize β get actual amount of memory allocated for a KFENCE object π
β¨ SYNOPSIS β¨
size_t kfence_ksize (const void *addr );
π ARGUMENTS π
addrβ pointer to a heap object π§
π RETURN π
0β not a KFENCE object, must call__ksizeinstead,non-0β this many bytes can be accessed without causing a memory error.
so if you get0, bestie, that's your cue to go call__ksizeinstead π
π¦ DESCRIPTION π¦
kfence_ksize returns the number of bytes requested for a KFENCE object at allocation time. This number may be less than the object size of the corresponding struct kmem_cache. That's the whole vibe β iconic, precise, no cap π
π SEE ALSO π
Kernel file ./include/linux/kfence.h is the home base for this whole situation, and the squad is:
is_kfence_address(9)kfence_alloc_pool_and_metadata(9)kfence_init(9)kfence_shutdown_cache(9)kfence_alloc(9)kfence_object_start(9)__kfence_free(9)kfence_free(9)kfence_handle_page_fault(9)__kfence_obj_info(9)
mwah π source/version: ./include/linux Β· date: October 2026 Β· page: kfence_ksize(9) β that's a wrap, bestie πβ¨
π¦ 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