On Wed, Feb 20, 2013 at 04:42:54PM +0100, Alexander Klauer
<[email protected]> wrote:
> #define ev_free(ptr) ev_realloc ((ptr), 0)
>
> This causes a memory leak on systems where zero-sized objects are
Only if the user-supplied allocator is buggy - the default implementation
calls free.
> #define ev_free(ptr) free ((ptr))
That would be a bug - there is no reason to believe that the user-supplied
allocator is compatible with free.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / [email protected]
-=====/_/_//_/\_,_/ /_/\_\
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev