WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] ocaml: fix ocaml xc compilation on 32 bit

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] ocaml: fix ocaml xc compilation on 32 bit
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 20 May 2010 14:13:38 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 20 May 2010 06:14:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1274360218.14939.2377.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acr4HJSoj6KqODD/SG2KlVANL0jycAAAa24b
Thread-topic: [Xen-devel] [PATCH] ocaml: fix ocaml xc compilation on 32 bit
User-agent: Microsoft-Entourage/12.24.0.100205
On 20/05/2010 13:56, "Ian Campbell" <Ian.Campbell@xxxxxxxxxx> 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.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>