Date: Thu, 2 Dec 2004 11:30:17 +0000 (GMT) From: Richard Tobin <richard@inf.ed.ac.uk> To: "Brandon S. Allbery KF8NH" <allbery@ece.cmu.edu>, =?UTF-8?Q?=E5=93=89?= <jinmei@isl.rdc.toshiba.co.jp> Cc: current@freebsd.org Subject: Re: malloc(0) returns an invalid address Message-ID: <20041202113017.79B3F1B43CC@macintosh.inf.ed.ac.uk> In-Reply-To: Brandon S. Allbery KF8NH's message of Thu, 02 Dec 2004 00:56:17 -0500
next in thread | raw e-mail | index | archive | help
> malloc() is required to return memory aligned for any fundamental C > type regardless of the amount of memory allocated (i.e. malloc(1) isn't > permitted to return an odd address on hardware where types larger than > (char) must be aligned). How could a conforming program tell the difference? (And so, why isn't it legal under the as-if rule?) -- Richard
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041202113017.79B3F1B43CC>