函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kmemleak_free - unregister a previously registered object*@ptr: pointer to beginning of the object* This function is called from the kernel allocators when an object (memory* block) is freed (kmem_cache_free, kfree, vfree etc.).

函数原型:void __ref kmemleak_free(const void *ptr)

返回类型:void

参数:

类型参数名称
const void *ptr
958  pr_debug("%s(0x%p)\n", __func__, ptr)
960  如果same as above but only for the kmemleak_free() callback ptr且非是错误Look up the metadata (struct kmemleak_object) corresponding to ptr and* delete it.
调用者
名称描述
genradix_free_node
vfree_atomicvfree_atomic - release memory allocated by vmalloc()*@addr: memory base address* This one is just like vfree() but can be called in any atomic context* except NMIs.
vfreevfree - release memory allocated by vmalloc()*@addr: memory base address* Free the virtually continuous memory area starting at @addr, as* obtained from vmalloc(), vmalloc_32() or __vmalloc()
kfree释放内存
kfree_hook
sg_kfree
setup_per_cpu_areasUP percpu area setup.* UP always uses km-based percpu allocator with identity mapping.* Static percpu variables are indistinguishable from the usual static* variables and don't require any special preparation.
kmemleak_free_recursive
blk_mq_free_rqs