page_pool_dev_alloc_frag(9)
π page_pool_dev_alloc_frag β the Kernel API Manual, bestie edition π
okay so, hi! this is a page from the Kernel API Manual, and it's all about page_pool_dev_alloc_frag. it's short, it's sweet, it's giving "small function, big job" energy. let's get into it β¨
πΈ NAME πΈ
page_pool_dev_alloc_frag β allocate a page fragment. that's it. that's the whole name. lowkey iconic that they just say it straight π«Ά
π¦ SYNOPSIS π¦
struct page * page_pool_dev_alloc_frag (struct page_pool *pool ,
unsigned int *offset , unsigned int size );
like, look at it. a return type of struct page *, three arguments, no drama. she's neat, she's tidy, she's ready for you π
π ARGUMENTS π
poolβ the pool you're pulling from. this is your pool, bestie, the one you're allocating out of πoffsetβ offset to the allocated page. it'll point you at where in the page your fragment actually lives πsizeβ requested size. how much you want. be honest about it fr fr π
β DESCRIPTION β
Get a page fragment from the page allocator or page_pool caches. that's the whole vibe β the function goes and fetches you a fragment, and it might come straight from the page allocator or out of the page_pool caches, iykyk π§
π₯ RETURN π₯
the allocated page fragment π β¦or NULL if it couldn't hook you up π so like, always check, okay? no cap, check your pointer.
π SEE ALSO π
soooo much good stuff in the family. the kernel file is ./include/net/page_pool/helpers.h, and everything here lives in the page_pool allocator(9) universe π
page_pool allocator(9)page_pool_dev_alloc_pages(9)page_pool_dev_alloc(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)
go read them all, main character energy only π
and that's the whole page, bestie π this cutie came out of ./include/net/page_pool, dated October 2026, and it's filed under the page_pool_dev_alloc_frag(9) name β go forth and allocate 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