Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kstrndup - allocate space for and copy an existing string*@s: the string to duplicate*@max: read at most @max chars from @s*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Note: Use kmemdup_nul() instead if the size is known exactly

Proto:char *kstrndup(const char *s, size_t max, gfp_t gfp)

Type:char

Parameter:

TypeParameterName
const char *s
size_tmax
gfp_tgfp
101  If Not s Then Return NULL
104  len = Find the length of a length-limited string
105  buf = kmalloc_track_caller(len + 1, gfp)
106  If buf Then
107  No 3D Now!(buf, s, len)
108  buf[len] = '\0'
110  Return buf
Caller
NameDescribe
__kstrncpyXXX: move to kstrncpy() once merged.* Users should use kfree_const() when freeing these.
trigger_request_store
trigger_async_request_store
trigger_custom_fallback_store
__kstrncpyXXX: move to kstrncpy() once merged.* Users should use kfree_const() when freeing these.
wakelock_lookup_add
__parse_imm_string
vmpressure_register_eventvmpressure_register_event() - Bind vmpressure notifications to an eventfd*@memcg: memcg that is interested in vmpressure notifications*@eventfd: eventfd context to link notifications with*@args: event arguments (pressure level threshold, optional mode)*