Memory leak in ev.c, the second

Marc Lehmann schmorp at schmorp.de
Sat Feb 23 19:22:04 CET 2013


On Fri, Feb 22, 2013 at 04:48:55PM +0100, Alexander Klauer <Alexander.Klauer at itwm.fraunhofer.de> wrote:
> So, in essence, this means the current glibc realloc() violates the
> C89 standard but is C99-conformant?

I think the problem was that the C89 wording was confusing, and the
way to proceed was to standardise behaviour that was comaptible to C89
implementations, even if that menas it is a not-so-useful subset of
previous behaviour.

> I like the C89 behaviour – it enables one to wrap all allocation
> business neatly into one single function.

Yes, a pity. POSIX also guaranteed it, but changed it as well (POSIX
always defers to ISO-C, so it wasn't even a change, strictly speaking).

> steering more and more away from the C89 realloc() specification. I
> have attached a patch for ev.pod to that effect.

Thanks, I'll have a look!

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list