realloc behavior

Yoni Londner yoni at hola.org
Sun Jan 29 08:38:03 PST 2012


Hi,

I just started using jemalloc, and one of our tests fail, because 
realloc with size=0
does malloc with size 1.

from realloc spec at 
http://pubs.opengroup.org/onlinepubs/000095399/functions/realloc.html :
If/size/is 0 and/ptr/is not a null pointer, the object pointed to is freed.


Why does jemalloc chooses to behave differently?


Yoni.



More information about the jemalloc-discuss mailing list