[Top][All Lists]

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

vm_offset_t type

From: Igor Khavkine
Subject: vm_offset_t type
Date: Mon, 11 Jun 2001 20:38:16 -0400
User-agent: Mutt/1.3.18i

I just noticed that when tracing back the type of `vm_offset_t'
we get back to `natural_t' which is defined with this comment in

 * A natural_t is the type for the native
 * integer type, e.g. 32 or 64 or.. whatever
 * register size the machine has.  Unsigned, it is
 * used for entities that might be either
 * unsigned integers or pointers, and for
 * type-casting between the two.
 * For instance, the IPC system represents
 * a port in user space as an integer and
 * in kernel space as a pointer.
typedef unsigned int  natural_t;

But isn't it true that most modern 64bit compilers still use a 
32 bit `int', but have a 64 bit `long'. The comment says that
natural_t should be wide enough to accomodate a whole register
or pointer. In that case, shouldn't it be defined as

typedef unsigned long  natural_t;

since `long' is still 32 bits on 32bit architectures.


reply via email to

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