On Wed, Apr 9, 2008 at 2:57 PM, Marc Lehmann <[EMAIL PROTECTED]> wrote:
> > Also, the default ev_realloc() does a realloc to zero for allocs of size > > zero, instead of an actual free(), which results in valgrind reporting a > > bunch of leaks of size zero at exit. Glibc's docs say realloc() to zero > > actually, realloc is defined to be free in that case in the C programming > language. I'm noticing some disparity in how that's actually handled across various libcs: glibc: if size is equal to zero, the call is equivalent to free(ptr).* *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. -- Tony Arcieri medioh.com
_______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
