On 2025-06-27 07:01, Alejandro Colomar wrote:
Hi!
Here's a new revision of the proposal, addressing some points raised by
Mark, plus clarifying that the paragraph about when size is zero refers
to the total size, as Florian was concerned that it might not be
symmetric.
I don't know if it would be useful, but proposing a new interface of the
form:
reallocp(&ptr, size)
... to separate the status return from the pointer might be a really
good idea. This would hopefully eliminate users doing the "obvious":
ptr = realloc(ptr, size)
Not that this resolves anything in the short or even medium term, but
perhaps can help avoid problems in the more distant time frame. It is
also an interface which is mostly trivial to infill.
-hpa