memory leak or something wrong

Marc Lehmann schmorp at schmorp.de
Mon Jun 18 22:06:31 CEST 2012


On Mon, Jun 18, 2012 at 01:56:43AM -0500, Brandon Black <blblack at gmail.com> wrote:
> In practice, on Fedora 16 (glibc 2.14), I've observed a very small
> leak on code like yours (you can even leave libev out of this, it's
> all about alloc/dealloc cycles using only the realloc() interface),

realloc (p, 0) is documented to be equivalent to free (p) on GNU/Linux
(specifically, on fedora and debian GNU/Linux), so this would be a bug in
debian or fedora, and should be reported to them, if realloc is indeed the
issue (and it probably is, as valgrind can't find any memleak).

It could also be some esoteric form of internal memory fragmentation,
which I would also consider a bug in the allocator.

-- 
                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