kmalloc_obj(9)
β¨ NAME β¨
okay so bestie, this is kmalloc_obj(9) from the Kernel API Manual β and its whole thing is allocating a single instance of the given type. one (1) little guy. iconic. no cap. π
π SYNOPSIS π
kmalloc_obj (VAR_OR_TYPE , ... );
π«Ά ARGUMENTS π«Ά
VAR_OR_TYPEβ the variable or type you're allocating. that's the main character of this call. β¨...β optional GFP flags for the allocation. if you don't pass any, it'sGFP_KERNEL, periodt. πΈ
π RETURN π
on success you get a newly allocated pointer to a VAR_OR_TYPE β slay. on failure you get NULL. π
π¦ SEE ALSO π¦
Kernel file: ./include/linux/slab.h β and the whole friend group is:
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_objs(9)kmalloc_flex(9)kmalloc_array(9)krealloc_array(9)kcalloc(9)kzalloc(9)kvmalloc_node(9)kvrealloc_node_align(9)kmalloc_size_roundup(9)
that's the whole vibe, bestie β source/version: ./include/linux, dated October 2026. mwah π
π¦ 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