函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Objects are considered unreferenced only if their color is white, they have* not be deleted and have a minimum age to avoid false positives caused by* pointers temporarily stored in CPU registers.

函数原型:static bool unreferenced_object(struct kmemleak_object *object)

返回类型:bool

参数:

类型参数名称
struct kmemleak_object *object
325  返回:Object colors, encoded with count and min_count:* - white - orphan object, not enough references to it (count < min_count)* - gray - not orphan, not marked as false positive (min_count == 0) or* sufficient references to it (count >= min_count)bject status flags 按位与lag representing the memory block allocation status time_before_eq(creation timestamp + used to avoid reporting of recently allocated objects , jiffies_last_scan)
调用者
名称描述
kmemleak_scanScan data sections and all the referenced memory blocks allocated via the* kernel's standard allocators. This function must be called with the* scan_mutex held.
kmemleak_seq_showPrint the information for an unreferenced object to the seq file.
kmemleak_clearWe use grey instead of black to ensure we can do future scans on the same* objects. If we did not do future scans these black objects could* potentially contain references to newly allocated objects in the future and* we'd end up with false positives.