Andrea Arcangeli wrote:

> > 5.5 it is the compiler's responsibility to generate whatever bit pattern
> > the machine uses for
> > that null pointer. Therefore, #defining NULL as 0 on a machine for which
> > internal null pointers are nonzero is as valid as on any other
> 
> Ok thanks! But what will happen if I will redefine NULL as (void
> *)0xffffffff as in my kernel project? Maybe we choosed 0xffffffff to goes
> around the autocompiler initialization of NULL and to choose by hand which
> page to not allocate in the TLB? I am not the one that take the decision
> to initialize NULL to 0xffffffff, I' ll ask to the guy too in the meantime

Well, NULL is part of the standard library rather than the C language
itself, so you can redefine it to anything that you wish if you're not
using the standard library.

However, personally I would have used e.g. _NULL or _kernel_NULL
instead, to avoid confusion.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to