Function report |
Source Code:mm\kmemleak.c |
Create Date:2022-07-28 16:21:39 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:static void add_scan_area(unsigned long ptr, size_t size, gfp_t gfp)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned long | ptr | |
size_t | size | |
gfp_t | gfp |
789 | struct kmemleak_scan_area * area = NULL |
792 | If Not object Then |
793 | Print a warning and dump the stack trace.("Adding scan area to unknown object at 0x%08lx\n", ptr) |
795 | Return |
798 | If scan_area_cache Then area = kmem_cache_alloc(scan_area_cache, GFP bitmask for kmemleak internal allocations (gfp)) |
801 | spin_lock_irqsave( & lock, flags) |
802 | If Not area Then |
803 | pr_warn_once("Cannot allocate a scan area, scanning the full object\n") |
806 | Go to out_unlock |
811 | Print a warning and dump the stack trace.("Scan area larger than object 0x%08lx\n", ptr) |
814 | Go to out_unlock |
817 | INIT_HLIST_NODE( & node) |
822 | out_unlock : |
823 | spin_unlock_irqrestore( & lock, flags) |
Name | Describe |
---|---|
kmemleak_scan_area | kmemleak_scan_area - limit the range to be scanned in an allocated object*@ptr: pointer to beginning or inside the object |
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 |