kmalloc_objs(9)
π kmalloc_objs(9) β Kernel API Manual π
okay so bestie, welcome to the kmalloc_objs(9) page β itβs giving βallocate me an array of a typeβ energy, and honestly? iconic. π
β¨ NAME β¨
kmalloc_objs β Allocate an array of the given type
like literally, it grabs you an array of whatever type you asked for. no cap. π
πΈ SYNOPSIS πΈ
kmalloc_objs (VAR_OR_TYPE , COUNT , ... );
π¦ ARGUMENTS π¦
VAR_OR_TYPEβ Variable or type to allocate an array of. yes bestie, thatβs the whole vibe: tell it what kind of array you want. β¨COUNTβ How many elements in the array. how many little guys are we fitting in here? π₯...β optional GFP flags for the allocation (GFP_KERNELwhen not specified). so if you donβt pass anything, it defaults toGFP_KERNELβ periodt. π
π RETURN π
newly allocated pointer to array of VAR_OR_TYPE on success, or NULL on failure.
so on the good path you get a shiny new pointer to your array, and on the bad path you get NULL β not me being dramatic, thatβs literally the contract. ππ
π«Ά SEE ALSO π«Ά
Kernel file ./include/linux/slab.h
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_flex(9)kmalloc_array(9)krealloc_array(9)kcalloc(9)kzalloc(9)kvmalloc_node(9)kvrealloc_node_align(9)kmalloc_size_roundup(9)
like yes, thatβs a lot of friends, but theyβre all linked in the kernel lore and you should lowkey go read them if you need the full picture. iykyk π
okay bye bestie β this page came from source/version ./include/linux, dated October 2026, and it ate. 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