Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 16 Nov 2011 20:29:57 -0600 Message-ID: <4EC471A5.F43@mindspring.com> Date: Wed, 16 Nov 2011 21:29:57 -0500 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.lang.c Subject: Re: Typecasting Pointers on a 64 bit System References: <87fwhobgvw.fsf@bazspaz.fatphil.org> <16538f8cbd288a8b1d1b0f16819bd562@msgid.frell.theremailer.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 27 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.156.228.229 X-Trace: sv3-qIlwCDDKXi61EJF6LfH0jJ1Z8f3nDMZDUhi2L3N8VoT/es+fWGXobnvZvCPgzkaIb6yXD1LMeWUZ3VD!QCY5c/WbsAJHyUY7aFUqLSImVB8fkT6E68qFdH7q/aLFwK4Y3xlj/66EhB5XhrPp+P3BhhKnmp+N!4GWOykNNWg== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1844 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:13533 Fritz Wuehler wrote: > > > Seebs writes: > > > Consider: > > > > > > struct foo *f = malloc(sizeof(*f)); > Btw I don't understand the nuances of the first line, > does it mean define a > structure called foo that contains a pointer to storage enough for one > pointer to a structure named foo that contains only a pointer? Close. It means that struct foo has been previously defined, and that (f) is a pointer to that type and that the malloc call will either allocate enough memory for one structure of that type and initialize (f) with the address of that memory or malloc will not allocate memory and will initialize (f) with a null pointer value. -- pete