函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Reinititalise user and admin reserves if memory is added or removed

函数原型:static int reserve_mem_notifier(struct notifier_block *nb, unsigned long action, void *data)

返回类型:int

参数:

类型参数名称
struct notifier_block *nb
unsigned longaction
void *data
3702  :action恒等于xposed to userspace
3704  tmp等于sysctl_user_reserve_kbytes
3705  如果0小于tmptmp小于1UL左移17位则Initialise sysctl_user_reserve_kbytes.* This is intended to prevent a user from starting a single memory hogging* process, such that they cannot recover (kill the hog) in OVERCOMMIT_NEVER* mode.* The default value is min(3% of free memory, 128MB)
3709  tmp等于sysctl_admin_reserve_kbytes
3710  如果0小于tmptmp小于1UL左移13位则Initialise sysctl_admin_reserve_kbytes.* The purpose of sysctl_admin_reserve_kbytes is to allow the sys admin* to log in and kill a memory hogging process.* Systems with more than 256MB will reserve 8MB, enough to recover
3713  退出
3714  :action恒等于xposed to userspace
3715  free_kbytes等于global_zone_page_state( First 128 byte cacheline (assuming 64 bit words) )左移PAGE_SHIFT determines the page size 减10位
3719  打印信息("vm.user_reserve_kbytes reset to %lu\n", sysctl_user_reserve_kbytes)
3725  打印信息("vm.admin_reserve_kbytes reset to %lu\n", sysctl_admin_reserve_kbytes)
3728  退出
3729  默认
3730  退出
3732  返回:Suits me