🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #720

Re: Common malloc/free practice violates ANSI standard ?

#720
From: Wm E Davidsen Jr
Date: Mon, 16 Oct 1989 19:46
22 lines
1662 bytes
In article <1989Oct14.043811.669@anucsd.oz>, bdm@anucsd.oz (Brendan McKay) writes:
|  [  elaborate and nifty argument here  ]
|  
|  Note that I'm not claiming the Standard is broken, only that the writers of
|  the standard have accidentally ruled out a common coding practice.

  You're half right. The wording could have been clarified although I'm
not sure your suggestion is the way to do it. You're wrong in that this
practice has been ruled out. In practice most version of malloc (every
version I've seen) return a quantity alligned so that the block starts
on the most restrictive boundary.

  When I started reading your post I thought you were going to make the
point that you can't have C on a machine which has no single most
restrictive boundary, such as ints start odd and double start even.
Fortunately I can't think of a reason to build such a machine, even to
start an argument.
-- 
bill davidsen	(davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon
Technical Details
Message-ID: <1151@crdos1.crd.ge.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!crdgw1!crdos1!davidsen
References: <1989Oct14.043811.669@anucsd.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!crdgw1!crdos1!davidsen
From: davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr)
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: Common malloc/free practice violates ANSI standard ?
Message-ID: <1151@crdos1.crd.ge.COM>
Date: 16 Oct 89 19:46:32 GMT
References: <1989Oct14.043811.669@anucsd.oz>
Reply-To: davidsen@crdos1.UUCP (bill davidsen)
Followup-To: comp.std.c
Organization: GE Corp R&D Center
Lines: 22