jackxiao / jslibs

Automatically exported from code.google.com/p/jslibs
0 stars 0 forks source link

issue using MaybeRealloc( xxx, 0 ) #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using the function MaybeRealloc( int requested, int received ),
if received is 0, usually, a realloc(0) is done.
A realloc of 0 may returns a NULL pointer and will failed the
J_S_ASSERT_ALLOC assertion.

Original issue reported on code.google.com by sou...@gmail.com on 21 Aug 2008 at 7:13

GoogleCodeExporter commented 9 years ago
Hopefully, we can rely on the fact that reallocating a smaller amount of memory 
does
always succeed.

Original comment by sou...@gmail.com on 21 Aug 2008 at 7:18

GoogleCodeExporter commented 9 years ago

Original comment by sou...@gmail.com on 24 May 2009 at 9:01