Function report |
Source Code:mm\kmemleak.c |
Create Date:2022-07-28 16:22:03 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Scan a memory block (exclusive range) for valid pointers and add those* found to the gray list.
Proto:static void scan_block(void *_start, void *_end, struct kmemleak_object *scanned)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| void * | _start | |
| void * | _end | |
| struct kmemleak_object * | scanned |
| 1231 | start = PTR_ALIGN(_start, BYTES_PER_POINTER) |
| 1232 | end = _end - BYTES_PER_POINTER - 1 |
| 1242 | If Memory scanning is a long process and it needs to be interruptable. This* function checks whether such interrupt condition occurred. Then Break |
| 1245 | kasan_disable_current() |
| 1247 | kasan_enable_current() |
| 1249 | untagged_ptr = kasan_reset_tag((void * )pointer) |
| 1250 | If untagged_ptr < minimum and maximum address that may be valid pointers || untagged_ptr >= max_addr Then Continue |
| 1260 | If Not object Then Continue |
| 1273 | If color_gray(object) Then |
| 1276 | Else |
| 1280 | spin_unlock( & lock) |
| 1282 | If excess_ref Then |
| 1284 | If Not object Then Continue |
| 1291 | spin_unlock( & lock) |
| 1294 | read_unlock_irqrestore( & w_lock protecting the access to object_list and object_tree_root , flags) |
| Name | Describe |
|---|---|
| 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. |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |