函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Convert the statically allocated objects to dynamic ones:

函数原型:static int __init debug_objects_replace_static_objects(void)

返回类型:int

参数:

1297  db等于obj_hash
1301  cnt等于0
1303 i小于ODEBUG_POOL_SIZE循环
1304  obj等于Shortcuts
1305  如果非obj则转到:free
1307  hlist_add_head( & node, & objects)
1317  hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry*@pos: the type * to use as a loop cursor.*@n: another &struct hlist_node to use as temporary storage*@head: the head for your list.(obj, tmp, & obj_pool, node)
1318  hlist_del( & node)
1320  移出列表
1323 i小于ODEBUG_HASH_SIZE循环
1324  移出列表
1327  new等于hlist_entry(first, typeof( * obj), node)
1328  hlist_del( & node)
1330  new等于obj
1331  hlist_add_head( & node, & list)
1332  cnt自加
1336  pr_debug("%d of %d active objects replaced\n", cnt, obj_pool_used)
1338  返回:0
1339  free :
1341  hlist_del( & node)
1342  kmem_cache_free(obj_cache, obj)
1344  返回:负ENOMEM
调用者
名称描述
debug_objects_mem_initCalled after the kmem_caches are functional to setup a dedicated* cache pool, which has the SLAB_DEBUG_OBJECTS flag set. This flag* prevents that the debug code is called on kmem_cache_free() for the* debug tracker objects to avoid recursive calls.