Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:free_reserved_area

Proto:unsigned long free_reserved_area(void *start, void *end, int poison, const char *s)

Type:unsigned long

Parameter:

TypeParameterName
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  When pos < end cycle
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  If poison <= 0xFF Then memset(direct_map_addr, poison, PAGE_SIZE)
7494  free_reserved_page(page)
7497  If pages && s Then pr_info("Freeing %s memory: %ldK\n", s, pages << (PAGE_SHIFT determines the page size - 10))
7501  Return pages
Caller
NameDescribe
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.