---
name: "krealloc"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/krealloc"
---

# krealloc(9)

reallocate memory. The contents will remain unchanged.

## NAME

krealloc - reallocate memory. The contents will remain unchanged.

## SYNOPSIS

**void \* krealloc(const void \*** *p***, size\_t** *new\_size***, gfp\_t** *flags***);**

## ARGUMENTS

*p*

object to reallocate memory for.

*new\_size*

how many bytes of memory are required.

*flags*

the type of memory to allocate.

## DESCRIPTION

The contents of the object pointed to are preserved up to the lesser of the new and old sizes. If *p* is **NULL**, **krealloc** behaves exactly like **kmalloc**. If *new\_size* is 0 and *p* is not a **NULL** pointer, the object pointed to is freed.

## COPYRIGHT
