---
name: "sk_alloc"
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/sk_alloc"
---

# sk\_alloc(9)

All socket objects are allocated here

## NAME

sk\_alloc - All socket objects are allocated here

## SYNOPSIS

**struct sock \* sk\_alloc(struct net \*** *net***, int** *family***, gfp\_t** *priority***, struct proto \*** *prot***, int** *kern***);**

## ARGUMENTS

*net*

the applicable net namespace

*family*

protocol family

*priority*

for allocation (**GFP\_KERNEL**, **GFP\_ATOMIC**, etc)

*prot*

struct proto associated with this new sock instance

*kern*

is this to be a kernel socket?

## COPYRIGHT
