other versions
- stretch 4.9.168-1
KSTRNDUP(9) | Memory Management in Linux | KSTRNDUP(9) |
NAME¶
kstrndup - allocate space for and copy an existing stringSYNOPSIS¶
char * kstrndup(const char * s, size_t max, gfp_t gfp);
ARGUMENTS¶
sthe 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.COPYRIGHT¶
April 2019 | Kernel Hackers Manual 4.9. |