---
name: "SPI_repalloc"
section: "3"
platform: "linux"
package: "postgresql"
version: "18.6-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/SPI_repalloc"
---

# SPI\_repalloc(3)

reallocate memory in the upper executor context

## NAME

SPI\_repalloc - reallocate memory in the upper executor context

## SYNOPSIS

```
void * SPI_repalloc(void * pointer, Size size)
```

## DESCRIPTION

**SPI\_repalloc** changes the size of a memory segment previously allocated using **SPI\_palloc**.

This function is no longer different from plain **repalloc**. It's kept just for backward compatibility of existing code.

## ARGUMENTS

void \* *pointer*

pointer to existing storage to change

Size *size*

size in bytes of storage to allocate

## RETURN VALUE

pointer to new storage space of specified size with the contents copied from the existing area
