public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tristan Partin <[email protected]>
To: Tom Lane <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Add malloc attribute to memory allocation functions
Date: Tue, 07 Jul 2026 23:57:23 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Tue Jul 7, 2026 at 6:54 PM CDT, Tom Lane wrote:
> Michael Paquier <[email protected]> writes:
>> Additional question. Does this help with requirements like the one
>> listed in fe-exec.c for PQfreemem() under WIN32?
>
> Yeah, I was wondering about that point too. It would be really nice
> to have automated checks for that. Maybe the right thing to do here
> (to start anyway) is to put in targeted annotations that address
> specific pain points like that one.
>
> One issue that'd have to be dealt with is that that would involve
> putting annotations into the public header file libpq-fe.h. We'd need
> to be sure we do not break things for applications using compilers
> other than what we built libpq with. That seems reasonably easy to do
> with some macro trickery, but it's a point to keep in mind.
Ok, I think the path forward is two-fold:
1. Add the annotations to specific pain points as Tom suggested
(PGfreemem(), frontend memory allocators)
2. Add the annotations to the backend allocators knowing that the patch
may not be committed
--
Tristan Partin
PostgreSQL Contributors Team
AWS (https://aws.amazon.com)
view thread (10+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Add malloc attribute to memory allocation functions
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox