mywiki:linux:page_allocation
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mywiki:linux:page_allocation [2016/05/18 15:20] – shaoguoh | mywiki:linux:page_allocation [2019/09/15 18:55] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| | Reference | | | | Reference | | | ||
| - | Linux Page Allocation | ||
| + | ====== Address Conversion ====== | ||
| + | ===== page to Virtual address ===== | ||
| + | < | ||
| + | struct page *page; | ||
| + | unsigned char *p; | ||
| + | p = page_address(page); | ||
| + | </ | ||
| + | |||
| + | Other APIs: | ||
| + | |||
| + | * kmap_atomic | ||
| + | * __kunmap_atomic | ||
| + | ====== Linux Page Allocation ====== | ||
| Allocate pages | Allocate pages | ||
| Line 20: | Line 32: | ||
| page = alloc_page(gfp_mask); | page = alloc_page(gfp_mask); | ||
| if (page) | if (page) | ||
| - | memcpy(**page_address**(page), | + | memcpy(page_address(page), |
| / | / | ||
mywiki/linux/page_allocation.1463556052.txt.gz · Last modified: (external edit)
