kzalloc(9)
π kzalloc(9) π
okay so bestie, we're in the Kernel API Manual today and this page is literally about kzalloc β yes that's the kernel one, not some random thing, iykyk. buckle up π
β¨ NAME β¨
kzalloc β allocate memory. The memory is set to zero. π«Ά
that's it. that's the whole personality. it allocates, it zeroes, it slays.
πΈ SYNOPSIS πΈ
void * kzalloc (size_t size , gfp_t flags );
look at her. two arguments, one return, zero drama. main character energy for real π
π¦ ARGUMENTS π¦
sizeβ how many bytes of memory are required. like, how much room does your little guy need. count the bytes, bestie, the kernel is not gonna do it for you πflagsβ the type of memory to allocate (seekmalloc). yep, so if you're confused about the flags situation, thekmallocpage is right there, go read it, it's giving reference material β¨
π SEE ALSO π
the whole friend group showed up, no cap π
- Kernel file
./include/linux/slab.hβ the source file itself, iconic 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)kcalloc(9)kvmalloc_node(9)kvrealloc_node_align(9)kmalloc_size_roundup(9)
like, that's a full roster. every single one of them. periodt π
and that's the page, bestie π everything above is straight facts, no invented lore, promise π
this one came from the source at ./include/linux, dated October 2026, and it's filed under kzalloc(9) β mwah, go allocate something, love u πππ§
π¦ 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