Memory Management API: get_zeroed_page, apiget_zeroed_page
Unsigned long get_zeroed_page (gfp_t gfp_mask) is used to apply for a page and its content will be cleared. the source code analysis is as follows: unsigned long get_zeroed_page (gfp_t gfp_mask) {# You can see that a flags ,__ GFP_ZERO is added here. This flag clears the applied page with return _ get_free_pages (gfp_mask | _ GFP_ZERO, 0);} unsigned long _ get_free_pages (gfp_t gfp_mask, unsigned int order) {struct page * page;/** _ get_free_pages () returns a 32-bit address, which cannot represent * a highmem page */# You can see that this function cannot apply for high-end memory VM_BUG_ON (gfp_mask & _ GFP_HIGHMEM )! = 0); # The order here is zero. Apply for a pagepage = alloc_pages (gfp_mask, order); if (! Page) return 0; # convert the page into a virtual address and return it to the user return (unsigned long) page_address (page );}