Path: csiph.com!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Wed, 20 Jul 2016 16:31:39 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: A glitch regarding the usual malloc() idiom References: <4cd22745-22ad-4ac7-bdba-39ffa1c75e13@googlegroups.com> <7d995799-5f23-4784-a62e-ea423de00650@googlegroups.com> <87k2gg2j8c.fsf@gmail.com> Date: Wed, 20 Jul 2016 22:31:39 +0100 Message-ID: <87inw0vvwk.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:0N4ZmHXedRcHiaQWbtXUCYRs6UI= MIME-Version: 1.0 Content-Type: text/plain Lines: 20 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-sH6+0XgWGJvUDRyC7AgdWiJ9nhEYPzvDZKIzxIuYejklzpx0y/yp+LC29qXFMW1tp8XNquSEtlrwQ8T!TAYJ6pAgAgQrHYpvHfJzOWgqfDGuae7kyG3hblMTqDSc+OKasC+3/Bh2F5oNLqxND6Q= 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: 1904 Xref: csiph.com comp.lang.c:90698 Ike Naar writes: > On 2016-07-20, Gareth Owen wrote: >> Richard Heathfield writes: >> >>>> It's the double abstraction problem >>>> >>>> magptr = malloc(40 * sizeof(float)); >>>> >>>> tells us that we are asking for 160 bytes of memory. >>> >>> No, it doesn't. It tells us we're asking for 40 * sizeof(float) bytes >>> of memory. >> >> Supremely confident idiot. > > Your suggestion that RH's an idiot tells us more about you than it > tells us about RH. Can you explain what's wrong with RH's remark? I wasn't suggesting that RH is an idiot.