On Tue, 21 Feb 2023 at 07:30, Andres Freund <andres@anarazel.de> wrote:
> 2) We should introduce an API mcxt.c API to perform allocations that the
> caller promises not to individually free.
It's not just pfree. Offhand, there's also repalloc,
GetMemoryChunkSpace and GetMemoryChunkContext too.
I am interested in a bump allocator for tuplesort.c. There it would be
used in isolation and all the code which would touch pointers
allocated by the bump allocator would be self-contained to the
tuplesorting code.
What use case do you have in mind?
David