函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:zs_shrinker_count

函数原型:static unsigned long zs_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc)

返回类型:unsigned long

参数:

类型参数名称
struct shrinker *shrinker
struct shrink_control *sc
2359  pages_to_free等于0
2360  pool等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(shrinker, structzs_pool, shrinker)
2363 i大于等于0循环
2364  class等于size_class[i]
2365  如果非class则继续下一循环
2367  如果index不等于i则继续下一循环
2370  pages_to_free加等于Based on the number of unused allocated objects calculate* and return the number of pages that we can free.
2373  返回:pages_to_free