---
name: "rtapi_slab"
section: "3rtapi"
platform: "linux"
package: "linuxcnc-uspace-dev"
version: "1:2.9.4-2+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rtapi_slab"
---

# rtapi\_slab(3rtapi)

RTAPI wrappers for linux kernel functionality

## NAME

rtapi\_slab.h - RTAPI wrappers for linux kernel functionality

## SYNTAX

\#include \<rtapi\_slab.h\>

void \*rtapi\_kmalloc(size\_t size, gfp\_t g);

void \*rtapi\_kzalloc(size\_t size, gfp\_t g);

void \*rtapi\_krealloc(size\_t size, gfp\_t g);

void rtapi\_kfree(void \*);

## DESCRIPTION

In kernel space, each rtapi\_xxx or RTAPI\_XXX identifier is mapped to the underlying kernel functionality, if available.

In userspace, or in kernels where the underlying functionality is not provided by a kernel, generally another implementation--possibly with reduced functionality--is provided.  (For example, the userspace implementation for rtapi\_device\_register always succeeds)

## REALTIME CONSIDERATIONS

Call only from within init/cleanup code, not from realtime tasks.  This function is not available from non-realtime code.

## RETURN VALUE

As in Linux.

## SEE ALSO
