---
name: "kmem_cache_alloc_node"
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_node"
---

# kmem\_cache\_alloc\_node(9)

Allocate an object on the specified node

## NAME

kmem\_cache\_alloc\_node - Allocate an object on the specified node

## SYNOPSIS

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

## ARGUMENTS

*cachep*

The cache to allocate from.

*flags*

See **kmalloc**.

*nodeid*

node number of the target node.

## DESCRIPTION

Identical to kmem\_cache\_alloc but it will allocate memory on the given node, which can improve the performance for cpu bound structures.

Fallback to other node is possible if \_\_GFP\_THISNODE is not set.

## COPYRIGHT
