Re: malloc(1/0) ??

From: H. Peter Anvin (hpa@zytor.com)
Date: Wed Nov 08 2000 - 17:11:34 EST


Followup to: <Pine.LNX.4.21.0011080149010.32613-100000@server.serve.me.nl>
By author: Igmar Palsenberg <maillist@chello.nl>
In newsgroup: linux.dev.kernel
>
>
> > The program does not work. A program works if it does what it's supposed to
> > do. If you want to argue that this program is supposed to print "ffffff"
> > then explain to me why the 'malloc' contains a zero in parenthesis.
> >
> > The program can't possibly work because it invokes undefined behavior. It
> > is impossible to determine what a program that invokes undefined behavior is
> > 'supposed to do'.
>
> May I remind you guys that a malloc(0) is equal to a free(). There is no
> way that any mem get's malloced.
>

Where the heck did you get idea?

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 15 2000 - 21:00:12 EST