函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:free_reserved_area

函数原型:unsigned long free_reserved_area(void *start, void *end, int poison, const char *s)

返回类型:unsigned long

参数:

类型参数名称
void *start
void *end
intpoison
const char *s
7475  pages等于0
7477  start等于 align the pointer to the (next) page boundary ((unsignedlong)start)
7478  end等于end按位与PAGE_MASK
7479 pos小于end循环
7480  page等于virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(pos)
7490  direct_map_addr等于page_address(page)
7491  如果poison小于等于0xFF则memset(direct_map_addr, poison, PAGE_SIZE)
7494  free_reserved_page(page)
7497  如果pagess打印信息("Freeing %s memory: %ldK\n", s, pages << (PAGE_SHIFT determines the page size - 10))
7501  返回:pages
调用者
名称描述
free_initrd_mem
free_initmem_defaultDefault method to free all the __init memory into the buddy system.* The freed pages will be poisoned with pattern "poison" if it's within* range [0, UCHAR_MAX].* Return pages freed into the buddy system.