From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] ocaml: fix ocaml xc compilation on 32 bit Date: Thu, 20 May 2010 14:13:38 +0100 Message-ID: References: <1274360218.14939.2377.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1274360218.14939.2377.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell , Christoph Egger Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 20/05/2010 13:56, "Ian Campbell" wrote: >>> - c_array = malloc(sizeof(xen_pfn_t) * c_nr_pfns); >>> + c_array = malloc(sizeof(uint64_t) * c_nr_pfns); >> >> Wouldn't it be better to have here >> >> + c_array = calloc(c_nr_pfns, sizeof(uint64_t)); > > I suppose so but that would be an unrelated change, please post a patch > if you think it is worth it. Who cares either way. calloc() has potential extra overhead for clearing the memory, which is presumably not required in this case. K.