Reputation: 369
I get one huge page by struct page *page=alloc_pages()
, and I want to verify if it is a 2MB page. Is there any kernel function that I can use to convert this page to its virtual address?
Upvotes: 1
Views: 994
Reputation: 6097
For the pages allocated with alloc_page()
or the like, you can use page_address()
to obtain their virtual addresses (see <linux/mm.h>
).
Upvotes: 5