Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kstrdup_const - conditionally duplicate an existing const string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Note: Strings allocated by kstrdup_const should be freed by kfree_const.

Proto:const char *kstrdup_const(const char *s, gfp_t gfp)

Type:char

Parameter:

TypeParameterName
const char *s
gfp_tgfp
79  If s_kernel_rodata - checks if the pointer address is located in the* .rodata section*@addr: address to check* Returns: true if the address is located in .rodata, false otherwise. Then Return s
82  Return kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error
Caller
NameDescribe
kvasprintf_constIf fmt contains no % (or is exactly %s), use kstrdup_const. If fmt* (or the sole vararg) points to rodata, we will then save a memory* allocation and string copy. In any case, the return value should be* freed using kfree_const().
devm_gen_pool_createdevm_gen_pool_create - managed gen_pool_create*@dev: device that provides the gen_pool*@min_alloc_order: log base 2 of number of bytes each bitmap bit represents*@nid: node selector for allocated gen_pool, %NUMA_NO_NODE for all nodes*@name: name of a
kmem_cache_create_usercopykmem_cache_create_usercopy - Create a cache with a region suitable* for copying to userspace*@name: A string which is used in /proc/slabinfo to identify this cache.*@size: The size of objects to be created in this cache.
kobject_renamekobject_rename() - Change the name of an object