Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-28 15:07:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:calc_memmap_size

Proto:static unsigned long __init calc_memmap_size(unsigned long spanned_pages, unsigned long present_pages)

Type:unsigned long

Parameter:

TypeParameterName
unsigned longspanned_pages
unsigned longpresent_pages
6640  pages = spanned_pages
6650  If spanned_pages > present_pages + (present_pages >> 4) && IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SPARSEMEM) Then pages = present_pages
6654  Return align the pointer to the (next) page boundary (pages * sizeof(structpage)) >> PAGE_SHIFT determines the page size
Caller
NameDescribe
free_area_init_coreSet up the zone data structures:* - mark all pages reserved* - mark all memory queues empty* - clear the memory bitmaps* NOTE: pgdat should get zeroed by caller.* NOTE: this function is only called during early init.