Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\kmemleak.c Create Date:2022-07-28 16:21:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kmemleak_alloc - register a newly allocated object*@ptr: pointer to beginning of the object*@size: size of the object*@min_count: minimum number of references to this object. If during memory* scanning a number of references less than @min_count is found,

Proto:void __ref kmemleak_alloc(const void *ptr, size_t size, int min_count, gfp_t gfp)

Type:void

Parameter:

TypeParameterName
const void *ptr
size_tsize
intmin_count
gfp_tgfp
890  pr_debug("%s(0x%p, %zu, %d)\n", __func__, ptr, size, min_count)
892  If set if tracing memory operations is enabled && ptr && Not IS_ERR(ptr) Then Create the metadata (struct kmemleak_object) corresponding to an allocated* memory block and add it to the object_list and object_tree_root.
Caller
NameDescribe
genradix_alloc_node
alloc_large_system_hashallocate a large system hash table from bootmem* - it is assumed that the hash table must contain an exact power-of-2* quantity of entries* - limit is the number of hash buckets, not the total allocation size
__do_kmalloc_nodeEnd of slob allocator proper. Begin kmem_cache_alloc and kmalloc frontend.
kmalloc_large_node_hookHooks for other subsystems that check memory allocations. In a typical* production configuration these hooks all should produce no code at all.
kmemleak_alloc_physkmemleak_alloc_phys - similar to kmemleak_alloc but taking a physical* address argument*@phys: physical address of the object*@size: size of the object*@min_count: minimum number of references to this object
kmemleak_alloc_recursive
sg_kmallocThe default behaviour of sg_alloc_table() is to use these kmalloc/kfree* helpers.