I talk with filip about it, he confrim the fix is correct
IEEE spec did mentor it exists two diffent behvoir
on malloc(0). My windows 2000 is return NULL from
malloc(0) and some other windows I got did not.
----- Original Message -----
From: "Gunnar Dalsnes" <hardon(a)online.no>
To: "ReactOS Development List" <ros-dev(a)reactos.org>
Sent: Saturday, June 03, 2006 6:57 PM
Subject: Re: [ros-dev] [ros-diffs] [greatlrd] 22195: make malloc,calloc and
some other function return NULL if size is 0
Magnus Olsen wrote:
HI
Malloc(0) did not reaturn NULL;
that was the fix for. I am reading the IEEE spec
how malloc should work, and it exists two diffent
implement of it. and some exprenet on diffent windows
platfrom show diffent behvior about malloc(0)
IEEE specs really have nothing to do with how Windows behaves. Windows
NEVER follow standards. A quick test on Win XP shows malloc(0) return a
pointer to stack, so MSDN is right (surprise!) and your fix is wrong. If
some older version of Windows did otherwise, this is a job for a
compability framework (which we dont have).
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev