valgrind stuff

Marc Lehmann schmorp at
Wed Apr 9 23:17:26 CEST 2008

> I'm noticing some disparity in how that's actually handled across various
> libcs:

wow, that would be rather horrible, however:

> *OpenBSD: If size is zero and ptr is not a null pointer, the object it
> points to is freed and a new zero size object is returned.
> Darwin: If size is zero and ptr is not NULL, a new, minimum sized object is
> allocated and the original object is freed.

it is not surprising that the ones who are buggy are yet again openbsd and

(it's actually the unix specification that requires this, btw., not C)

I will investigate a bit and document this breakage (and likely implement a
workaround allocate for those operating systems).

thanks for the info, I looked at the unix spec and various free and
non-free unices and found this behaviour to be portable. openbsd or darwin
were not among them.

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list