函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:calculate_node_totalpages

函数原型:static void __init calculate_node_totalpages(struct pglist_data *pgdat, unsigned long node_start_pfn, unsigned long node_end_pfn, unsigned long *zones_size, unsigned long *zholes_size)

返回类型:void

参数:

类型参数名称
struct pglist_data *pgdat
unsigned longnode_start_pfn
unsigned longnode_end_pfn
unsigned long *zones_size
unsigned long *zholes_size
6524  realtotalpages等于0, totalpages等于0
6527 i小于MAX_NR_ZONES循环
6528  zone等于包含了结点中各内存域的数据结构i
6532  size等于zone_spanned_pages_in_node(全局结点ID, i, node_start_pfn, node_end_pfn, & zone_start_pfn, & zone_end_pfn, zones_size)
6538  real_size等于sizezone_absent_pages_in_node(全局结点ID, i, node_start_pfn, node_end_pfn, zholes_size)
6541  如果size内存域第一个页帧的索引等于zone_start_pfn
6543  否则内存域第一个页帧的索引等于0
6545  内存域中页的总数等于size
6546  内存域中实际上可用的页数目等于real_size
6548  totalpages加等于size
6549  realtotalpages加等于real_size
6552  该结点以页帧为单位计算的长度,包含内存空洞等于totalpages
6553  结点中页帧的数目等于realtotalpages
6554  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
调用者
名称描述
free_area_init_node