函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Scan a memory block corresponding to a kmemleak_object. A condition is* that object->use_count >= 1.

函数原型:static void scan_object(struct kmemleak_object *object)

返回类型:void

参数:

类型参数名称
struct kmemleak_object *object
1327  spin_lock_irqsave( & lock, flags)
1328  如果bject status flags 按位与lag set to not scan the object 则转到:out
1330  如果非bject status flags 按位与lag representing the memory block allocation status 的值则转到:out
1333  如果hlist_empty( & memory ranges to be scanned inside an object (empty for all) )或bject status flags 按位与lag set to fully scan the object when scan_area allocation failed
1335  start等于pointer
1336  end等于pointersize
1339  循环
1343  start等于next
1344  如果start大于等于end退出
1348  cond_resched()
1350 bject status flags 按位与lag representing the memory block allocation status 循环
1351  否则hlist_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the hlist_node within the struct.(area, & memory ranges to be scanned inside an object (empty for all) , node)
1353  Scan a memory block (exclusive range) for valid pointers and add those* found to the gray list.
1356  out :
1357  spin_unlock_irqrestore( & lock, flags)
调用者
名称描述
scan_gray_listScan the objects already referenced (gray objects). More objects will be* referenced and, if there are no memory leaks, all the objects are scanned.