---
name: "kstrdup"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/kstrdup"
---

# kstrdup(9)

allocate space for and copy an existing string

## NAME

kstrdup - allocate space for and copy an existing string

## SYNOPSIS

**char \* kstrdup(const char \*** *s***, gfp\_t** *gfp***);**

## ARGUMENTS

*s*

the string to duplicate

*gfp*

the GFP mask used in the **kmalloc** call when allocating memory

## COPYRIGHT
