libnvme\_realloc(9) libnvme API manual libnvme\_realloc(9)

# [NAME](#NAME)

libnvme\_realloc - Resize an allocated memory buffer

# [SYNOPSIS](#SYNOPSIS)

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

# [ARGUMENTS](#ARGUMENTS)

[p](#p)

Existing memory buffer to resize

[len](#len)

New size in bytes

# [DESCRIPTION](#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](#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.

libnvme\_realloc October 2026

---

Document: libnvme_realloc-libnvme3(2) from nvme-cli 3.2-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
