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] size_t and printk and Xen

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] size_t and printk and Xen
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Sun, 12 Oct 2008 11:12:33 -0700 (PDT)
Cc:
Delivery-date: Sun, 12 Oct 2008 11:13:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C517F91D.1E1AA%keir.fraser@xxxxxxxxxxxxx>
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
> >> I'm no particular fan of size_t in hypervisor interfaces
> >> though. So, for
> >> example, switching xmalloc() interfaces to use unsigned int
> >> instead would be
> >> fine by me, and this would sidestep the issue perhaps?
> > 
> > I think C99 size_t may have compile-time type-checking uses so
> > I'd be hesitant to remove it entirely.
> 
> Can you give a concrete example of how it helps us to use it 
> within the
> xmalloc interfaces? As far as I'm aware it's not useful at 
> all, but I could
> certainly be wrong as this aspect of the C spec is not 
> something I've ever
> really investigated.

No, I can't.  IIRC it has something to do with portability to
unusual platforms.  Perhaps someone else with more knowledge
of C99 can comment on whether size_t is useful in Xen or we
should just avoid using it.

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