Re: Q: void* vs. unsigned long

Chuck Lever (cel@monkey.org)
Tue, 16 Feb 1999 15:04:25 -0500 (EST)


On Tue, 16 Feb 1999, Brian Gerst wrote:
> H. Peter Anvin wrote:
> > Actually, it will. sizeof(unsigned long) == sizeof(void *) == 8 on
> > 64-bit architectures.
>
> I thought it was int that changed with the word size of the
> architecture, not long. Most C books I've seen said long is always 32
> bits regardless of the word size. Regardless, if the value represents a
> pointer, then it should be declared as such - for the sake of clarity if
> nothing else.

i was also wondering about the use of (ulong) and (void *). is it true
that (ulong) is used for physical addresses and void * is used for virtual
addresses? wouldn't it be clearer to use a couple of typedefs?

- Chuck Lever

--
corporate:	<chuckl@netscape.com>
personal:	<chucklever@netscape.net> or <cel@monkey.org>

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/