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

# kmem\_cache\_alloc(9)

Allocate an object

## NAME

kmem\_cache\_alloc - Allocate an object

## SYNOPSIS

**void \* kmem\_cache\_alloc(struct kmem\_cache \*** *cachep***, gfp\_t** *flags***);**

## ARGUMENTS

*cachep*

The cache to allocate from.

*flags*

See **kmalloc**.

## DESCRIPTION

Allocate an object from this cache. The flags are only relevant if the cache has no available objects.

## COPYRIGHT
