[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH, RFC] More than 2G of memory on 64-bit hosts

From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH, RFC] More than 2G of memory on 64-bit hosts
Date: Wed, 27 Jun 2007 13:26:54 +0300

On 6/26/07, Paul Brook <address@hidden> wrote:
The story behind this is that ISO C89 requires that "long" be at least as big
as a pointer (ie. "void *"). The actual requirement is that it be possible to
store a pointer in a standard integer type, and "long" is the largest
standard integer type.

Unfortunately C99 relaxed this requirement, and allowed abominations like the
win64 ABI.

This means you have a choice: Write standard conforming code (long) that works
on all known systems except win64, or use features that do't exist on many
systems. IIRC C99 types like intptr_t are not supported on several fairly
common unix systems.

In that case I'll vote for unsigned long. I'd pass the issue to those
doing a win64 port, if ever that happens.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]