函数逻辑报告 | 
Source Code:mm\kmemleak.c | 
Create Date:2022-07-27 17:56:25 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Add a scanning area to the object. If at least one such area is added,* kmemleak will only scan these ranges rather than the whole memory block.
函数原型:static void add_scan_area(unsigned long ptr, size_t size, gfp_t gfp)
返回类型:void
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| unsigned long | ptr | |
| size_t | size | |
| gfp_t | gfp | 
| 789 | struct kmemleak_scan_area * area = NULL | 
| 792 | 如果非object则 | 
| 793 | Print a warning and dump the stack trace.("Adding scan area to unknown object at 0x%08lx\n", ptr) | 
| 795 | 返回 | 
| 798 | 如果scan_area_cache则area等于分配高速缓存区 | 
| 801 | spin_lock_irqsave( & lock, flags) | 
| 802 | 如果非area则 | 
| 803 | pr_warn_once("Cannot allocate a scan area, scanning the full object\n") | 
| 806 | 转到:out_unlock | 
| 811 | Print a warning and dump the stack trace.("Scan area larger than object 0x%08lx\n", ptr) | 
| 814 | 转到:out_unlock | 
| 817 | INIT_HLIST_NODE( & node) | 
| 822 | out_unlock : | 
| 823 | spin_unlock_irqrestore( & lock, flags) | 
| 名称 | 描述 | 
|---|---|
| kmemleak_scan_area | kmemleak_scan_area - limit the range to be scanned in an allocated object*@ptr: pointer to beginning or inside the object | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |