函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-27 16:37:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:calc_memmap_size

函数原型:static unsigned long __init calc_memmap_size(unsigned long spanned_pages, unsigned long present_pages)

返回类型:unsigned long

参数:

类型参数名称
unsigned longspanned_pages
unsigned longpresent_pages
6640  pages等于spanned_pages
6650  如果spanned_pages大于present_pagespresent_pages右移4位的值且IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SPARSEMEM)则pages等于present_pages
6654  返回: align the pointer to the (next) page boundary (pages * sizeof(structpage))右移PAGE_SHIFT determines the page size
调用者
名称描述
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.