函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Based on the number of unused allocated objects calculate* and return the number of pages that we can free.

函数原型:static unsigned long zs_can_compact(struct size_class *class)

返回类型:unsigned long

参数:

类型参数名称
struct size_class *class
2253  obj_allocated等于ype can be of enum type zs_stat_type or fullness_group
2254  obj_used等于ype can be of enum type zs_stat_type or fullness_group
2256  如果obj_allocated小于等于obj_used则返回:0
2259  obj_wasted等于obj_allocatedobj_used
2260  obj_wasted除等于objs_per_zspage
2262  返回:obj_wasted Number of PAGE_SIZE sized pages to combine to form a 'zspage'
调用者
名称描述
__zs_compact
zs_shrinker_count