table of contents
other versions
- jessie-backports 4.9.88-1+deb9u1~bpo8+1
- stretch 4.9.144-3
KSTRDUP_CONST(9) | Memory Management in Linux | KSTRDUP_CONST(9) |
NAME¶
kstrdup_const - conditionally duplicate an existing const stringSYNOPSIS¶
const char *
kstrdup_const(const char * s,
gfp_t gfp);
ARGUMENTS¶
sthe string to duplicate
gfp
the GFP mask used in the kmalloc call when
allocating memory
DESCRIPTION¶
Function returns source string if it is in .rodata section otherwise it fallbacks to kstrdup. Strings allocated by kstrdup_const should be freed by kfree_const.COPYRIGHT¶
May 2018 | Kernel Hackers Manual 4.9. |