page_pool_dev_alloc(9)
π page_pool_dev_alloc β the Kernel API Manual, but make it make sense π
okay bestie, so this is page_pool_dev_alloc(9) from the Kernel API Manual and it's genuinely one of the more chill ones β it just grabs you a page (or a lil piece of a page) and lets you get on with your life. no cap. let's go β¨
β¨ NAME β¨
page_pool_dev_alloc β allocate a page or a page fragment. that's it. that's the whole job π
π¦ SYNOPSIS π¦
struct page * page_pool_dev_alloc (struct page_pool *pool , unsigned int
*offset , unsigned int *size );
like, look at her. three args, returns a struct page *. main character energy fr fr π
πΈ ARGUMENTS πΈ
poolβ the pool you're pulling from. this is your source, your supplier, your plug for pages πoffsetβ offset to the allocated page. it tells you where the good stuff starts β¨sizeβ this one's doing double duty, lowkey iconic of her: in, it's the size you're requesting; out, it's the size you actually got. so like, read it after, not before π«Ά
π DESCRIPTION π
so the vibe is: you ask for a page or a page fragment, and she gets it for you from the page allocator or the page_pool caches β which one depends on the requested size, iykyk. the whole point is to allocate memory with the least memory utilization and performance penalty, which is basically the unix way of saying "we're being efficient about this, bestie" π§
highkey just let her cook.
β RETURN β
you get back the allocated page or page fragment. and if it doesn't work out? NULL. that's the whole story β no drama, just a null check, ok? π
π SEE ALSO π
the whole friend group, fr fr:
- Kernel file
./include/net/page_pool/helpers.hpage_pool allocator(9) page_pool_dev_alloc_pages(9)page_pool_dev_alloc_frag(9)page_pool_dev_alloc_va(9)page_pool_get_dma_dir(9)page_pool_fragment_page(9)page_pool_put_page(9)page_pool_put_full_page(9)page_pool_recycle_direct(9)page_pool_free_va(9)page_pool_get_dma_addr(9)page_pool_dma_sync_for_cpu(9)page_pool_is_unreadable(9)
π reminder that if she hands you NULL you do not go dereferencing it. that's not slay, that's a crash. check your pointers, bestie π
okay that's the whole page!! this one lives at ./include/net/page_pool and it's dated October 2026 β so yeah, go forth and allocate, you absolute icon π¦πβ¨
π¦ 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