kcalloc(9)
β¨ kcalloc β¨
okay so bestie, welcome to the kcalloc(9) page β it's the allocate memory for an array girlie, and the memory is set to zero. the way that's literally in the NAME section. iconic. π
πΈ NAME πΈ
kcalloc β allocate memory for an array. The memory is set to zero. no cap, that's the whole vibe: you get an array's worth of bytes, and every single one of them is a zero. clean slate energy. π«Ά
π SYNOPSIS π
kcalloc (n , size , flags );
π ARGUMENTS π
nβ number of elements. how many things are we putting in this array, bestie? that count. π’sizeβ element size. how big is each one of those things. πflagsβ the type of memory to allocate (seekmalloc). this is where you tell it what kind of memory behaviour you want, and the deets live over on thekmallocpage, iykyk. π©
π¦ SEE ALSO π¦
Kernel file ./include/linux/slab.h β and while you're there, go visit the whole friend group:
SLAB_HWCACHE_ALIGN(9)SLAB_TYPESAFE_BY_RCU(9)SLAB_ACCOUNT(9)SLAB_RECLAIM_ACCOUNT(9)struct kmem_cache_args(9)kmem_cache_create_usercopy(9)kmem_cache_create(9)krealloc_node_align(9)kmem_cache_alloc(9)kmem_cache_charge(9)kmalloc(9)kmalloc_nolock(9)__alloc_objs(9)__alloc_flex(9)kmalloc_obj(9)kmalloc_objs(9)kmalloc_flex(9)kmalloc_array(9)krealloc_array(9)kzalloc(9)kvmalloc_node(9)kvrealloc_node_align(9)kmalloc_size_roundup(9)
and that's the page, bestie, you ate. π the source/version situation is ./include/linux, and the date on this one is October 2026 β mwah, see u in the kernel tree ππβ
π¦ 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