Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Look up the metadata (struct kmemleak_object) corresponding to ptr and* delete it. If the memory block is partially freed, the function may create* additional metadata for the remaining parts of the block.

Proto:static void delete_object_part(unsigned long ptr, size_t size)

Type:void

Parameter:

TypeParameterName
unsigned longptr
size_tsize
705  object = Look up an object in the object search tree and remove it from both* object_tree_root and object_list. The returned object's use_count should be* at least 1, as initially set by create_object().
706  If Not object Then
708  Print a warning and dump the stack trace.("Partially freeing unknown object at 0x%08lx (size %zu)\n", ptr, size)
711  Return
719  start = pointer
720  end = pointer + size
721  If ptr > start Then Create the metadata (struct kmemleak_object) corresponding to an allocated* memory block and add it to the object_list and object_tree_root.
724  If ptr + size < end Then Create the metadata (struct kmemleak_object) corresponding to an allocated* memory block and add it to the object_list and object_tree_root.
728  Mark the object as not allocated and schedule RCU freeing via put_object().
Caller
NameDescribe
kmemleak_free_partkmemleak_free_part - partially unregister a previously registered object*@ptr: pointer to the beginning or inside the object