Re: [AD] mode-list updates.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tue, Oct 02, 2001 at 02:17:26PM +0200, Henrik Stokseth wrote:
>On Tuesday 02 October 2001 02:50, Peter Wang wrote:
>
>> Btw, in both modesel.c and bgfxapi.cpp, `realloc' is being used
>> incorrectly.
>
>Oh really? i think you are mistaken here, unless you can convince me 
>otherwise.
>
>realloc has some cool features. for example if ptr is NULL it works 
>equivalent to malloc and if size is 0 it works equivalent to free.
>
AFAIK this is not true for every compiler out there.

it is for gcc, and I think it is for msvc, but I'm not sure if it's
in the ansi c specs.

Especially the size=0 == free assumptions is something I'd be very careful with ;-)

btw. I tried allegro '.38  with the electricfence memory debugger and got loads of errors.
I'll try to download the latest cvs snapshot next week, and see what I can find out.



--
Martijn Versteegh



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/