函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-27 09:57:38
Last Modify:2020-03-17 11:04:53 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:dup_mm() - duplicates an existing mm structure*@tsk: the task_struct with which the new mm will be associated.*@oldmm: the mm to duplicate.* Allocates a new mm structure and duplicates the provided @oldmm structure* content into it.

函数原型:static struct mm_struct *dup_mm(struct task_struct *tsk, struct mm_struct *oldmm)

返回类型:struct mm_struct

参数:

类型参数名称
struct task_struct *tsk
struct mm_struct *oldmm
1351  mm等于allocate_mm()
1352  如果非mm则转到:fail_nomem
1355  内存复制(mm, oldmm, mm的长度)
1357  如果非设置内核内存分配器则转到:fail_nomem
1360  err等于dup_mmap(mm, oldmm)
1361  如果err则转到:free_pt
1364  High-watermark of RSS usage 等于get_mm_rss(mm)
1365  High-water virtual memory usage 等于 Total pages mapped
1367  如果可执行文件的格式且非判断模块是否处于活动状态则转到:free_pt
1370  返回:mm
1372  free_pt :
1374  可执行文件的格式 = NULL
1375  mm_init_owner(mm, NULL)
1376  Decrement the use count and release all resources for an mm.
1378  fail_nomem :
1379  返回:NULL
调用者
名称描述
copy_mm复制内存
copy_init_mm