Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\kmemleak.c Create Date:2022-07-28 16:22:07
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:static void scan_object(struct kmemleak_object *object)

Type:void

Parameter:

TypeParameterName
struct kmemleak_object *object
1327  spin_lock_irqsave( & lock, flags)
1328  If bject status flags & lag set to not scan the object Then Go to out
1330  If Not (bject status flags & lag representing the memory block allocation status ) Then Go to out
1333  If 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 Then
1335  start = pointer
1336  end = pointer + size
1339  Do
1343  start = next
1344  If start >= end Then Break
1348  cond_resched()
1350  When bject status flags & lag representing the memory block allocation status cycle
1351  Else 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)
Caller
NameDescribe
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.