mywiki:linux:page_allocation
This is an old revision of the document!
Table of Contents
| Reference |
Address Conversion
page to Virtual address
struct page *page; unsigned char *p; p = page_address(page);
Linux Page Allocation
Allocate pages
struct page *page; page = alloc_pages(gfp, order);
Allocate one page
struct page *page, *head;
char *data="aljalf";
/*allocate a page */
page = alloc_page(gfp_mask);
if (page)
memcpy(page_address(page), data, strlen(data)+1 );
/*free a page*/
put_page(page );
mywiki/linux/page_allocation.1463622456.txt.gz · Last modified: (external edit)
