Daniel Gustafsson <daniel@yesql.se> writes:
>> On 24 Oct 2023, at 07:13, Gurjeet Singh <gurjeet@singh.im> wrote:
>> The user does not benefit from knowing that libpq allocates some/all memory
>> using malloc(). Mentioning malloc() here has a few downsides, and almost no
>> benefits.
> I'm not entirely convinced that replacing "malloc" with "allocated on the heap"
> improves the documentation.
That was my reaction too. The underlying storage allocator *is* malloc,
and C programmers know what that is, and I don't see how obfuscating
that improves matters. It's true that on the miserable excuse for a
platform that is Windows, you have to use PQfreemem because of
Microsoft's inability to supply a standards-compliant implementation
of malloc. But I'm not inclined to let that tail wag the dog.
> I do agree with this proposed change though:
> - all the space that will be freed by <xref linkend="libpq-PQclear"/>.
> + all the memory that will be freed by <xref linkend="libpq-PQclear"/>.
+1, seems harmless.
regards, tom lane