函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\snapshot.c Create Date:2022-07-27 11:01:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:gh_free_mem - Check if there is enough free memory for the image.

函数原型:static int enough_free_mem(unsigned int nr_pages, unsigned int nr_highmem)

返回类型:int

参数:

类型参数名称
unsigned intnr_pages
unsigned intnr_highmem
1878  free等于Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices.
1880 zone循环如果非Returns true if a zone has memory
1880  否则如果非s_highmem - helper function to quickly check if a struct zone is a* highmem zone or not. This is an attempt to keep references* to ZONE_{DMA/NORMAL/HIGHMEM/etc} in general code to a minimum.*@zone - pointer to struct zone variable
1882  free加等于zone_page_state(zone, NR_FREE_PAGES)
1884  nr_pages加等于count_pages_for_highmem(nr_highmem)
1885  pr_debug("Normal pages needed: %u + %u, available pages: %u\n", nr_pages, PAGES_FOR_IO, free)
1888  返回:free大于nr_pagesPAGES_FOR_IO
调用者
名称描述
swsusp_save