Postgresql 中文操作指南

SPI_repalloc

SPI_repalloc — 在上层执行器上下文中重新分配内存

SPI_repalloc — reallocate memory in the upper executor context

Synopsis

void * SPI_repalloc(void * pointer, Size size)

Description

SPI_repalloc 更改之前使用 SPI_palloc 分配的内存段的大小。

SPI_repalloc changes the size of a memory segment previously allocated using SPI_palloc.

此函数不再与纯 repalloc 有所不同。仅保留该函数以保持现有代码向后兼容。

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