From: Dan Magenheimer Subject: RE: size_t and printk and Xen Date: Sun, 12 Oct 2008 11:12:33 -0700 (PDT) Message-ID: <9aa34f3c-2ab0-4425-b4d4-0994cc7fa6fb@default> References: Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org > >> 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? > >=20 > > I think C99 size_t may have compile-time type-checking uses so > > I'd be hesitant to remove it entirely. >=20 > Can you give a concrete example of how it helps us to use it=20 > within the > xmalloc interfaces? As far as I'm aware it's not useful at=20 > all, but I could > certainly be wrong as this aspect of the C spec is not=20 > 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.