---
name: "libnvme_realloc-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnvme_realloc-libnvme3"
---

# libnvme\_realloc-libnvme3(2)

Resize an allocated memory buffer

## NAME

libnvme\_realloc - Resize an allocated memory buffer

## SYNOPSIS

**void \* libnvme\_realloc** **(void \*p** *,* **size\_t len** *);*

## ARGUMENTS

- p

  Existing memory buffer to resize

- len

  New size in bytes

## DESCRIPTION

Resizes the memory buffer referenced by *p* to *len* bytes. The returned buffer may be relocated. On successful expansion, any newly allocated portion of the buffer is zero-initialized.

If *p* is NULL, this function behaves like **libnvme\_alloc**.

## RETURN

Pointer to the resized memory buffer on success, or NULL on failure. On failure, the original buffer referenced by *p* remains valid and unchanged.
