kmem_dump_obj(9)
π kmem_dump_obj β kernel API manual, section 9, bestie
okay so real talk, this page is from the Kernel API Manual, section 9, and it's about kmem_dump_obj(9). yes the function and the manpage have the same name, that's just how kernel docs roll, we don't question it π
β¨ NAME β¨
kmem_dump_obj β print whatever slab provenance info we've got on hand, no cap
π¦ SYNOPSIS π¦
bool kmem_dump_obj (void *object );
πΈ ARGUMENTS πΈ
objectβ the slab object you're trying to get provenance info for. that's the whole assignment bestie, hand over the pointer π
π₯ DESCRIPTION π₯
so here's the vibe: this function uses pr_cont, which means it does not start a fresh line for you. the caller is expected to have already printed out whatever preamble makes sense in context. like, you set the stage, kmem_dump_obj just keeps the sentence going. main character energy but it needs a co-star π«Ά
the provenance info you actually get depends on the type of object and on how much debugging is enabled. so it's giving "results may vary" but in a kernel way.
for a slab-cache object specifically: it prints the fact that it is a slab object (iconic, we love confirmation), and then, if available, the slab name, the return address, and the stack trace from the allocation and last free path of that object. so basically the object's whole life story, receipts included πβ¨
β RETURN β
trueβ if the pointer is to a not-yet-freed object fromkmallocorkmem_cache_alloc- either
trueorfalseβ if the pointer is to an already-freed object (yeah, it's ambiguous, that's literally what the page says, don't come for me π) falseβ otherwise
π§ SEE ALSO π§
- Kernel file
./mm/slab_common.c__kmem_cache_create_args(9) kmem_buckets_create(9)kmem_cache_shrink(9)kfree_sensitive(9)struct kvfree_rcu_bulk_data(9)struct kfree_rcu_cpu_work(9)struct kfree_rcu_cpu(9)kvfree_rcu_barrier(9)kvfree_rcu_barrier_on_cache(9)
go read them, they're all in the group chat already π
π sign-off π
that's the whole page babes β it lives over in ./mm, dated October 2026, and the title/name on the tin is kmem_dump_obj(9). stay slay, go dump some objects responsibly ππ
π¦ 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