函数逻辑报告 |
Source Code:mm\kmemleak.c |
Create Date:2022-07-27 17:56:50 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Scan a memory block (exclusive range) for valid pointers and add those* found to the gray list.
函数原型:static void scan_block(void *_start, void *_end, struct kmemleak_object *scanned)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
void * | _start | |
void * | _end | |
struct kmemleak_object * | scanned |
1231 | start等于PTR_ALIGN(_start, BYTES_PER_POINTER) |
1232 | end等于_end减BYTES_PER_POINTER减1 |
1242 | 如果Memory scanning is a long process and it needs to be interruptable. This* function checks whether such interrupt condition occurred.则退出 |
1245 | kasan_disable_current() |
1247 | kasan_enable_current() |
1249 | untagged_ptr等于kasan_reset_tag((void * )pointer) |
1250 | 如果untagged_ptr小于minimum and maximum address that may be valid pointers 或untagged_ptr大于等于max_addr则继续下一循环 |
1260 | 如果非object则继续下一循环 |
1273 | 如果color_gray(object)则 |
1276 | 否则 |
1280 | 自旋锁解锁 |
1282 | 如果excess_ref则 |
1284 | 如果非object则继续下一循环 |
1291 | 自旋锁解锁 |
1294 | read_unlock_irqrestore( & w_lock protecting the access to object_list and object_tree_root , flags) |
名称 | 描述 |
---|---|
scan_object | Scan a memory block corresponding to a kmemleak_object. A condition is* that object->use_count >= 1. |
kmemleak_scan | Scan 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. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |