[Top][All Lists]

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

Re: [Pnet-developers] Use of ILNativeUInt vs. unsigned long in pointer c

From: Rhys Weatherley
Subject: Re: [Pnet-developers] Use of ILNativeUInt vs. unsigned long in pointer casting and manipulation
Date: Fri, 24 Sep 2004 16:58:58 +1000
User-agent: KMail/1.4.3

On Friday 24 September 2004 04:32 pm, Miroslaw Dobrzanski-Neumann wrote:

> *Do not reuse pointer for anything else*

Or rather, understand what bits of a pointer really are static.

The m68k assumption was based on "no one would ever have more than 16 Mb of 
memory", which is just as dumb as "two digit years will be good enough for 

My assumption is "a pointer to a machine word is guaranteed to have the bottom 
two bits set to zero".  I've yet to come across a machine that breaks this 
assumption and which cannot be adjusted through the use of malloc hacks.

Feel free to provide a counter-example.  In the worst case, a few macros in 
il_types.h may need #ifdef'ing if the "spare bits" aren't at the bottom 
(Peter and I already solved this for the 16-byte pointers in AS/400, but the 
16-byte port failed for other reasons).

> What does pnet mean? "portable .net"?

Portable to every platform that isn't terminally bletcherous.  We can't run on 
m68k PalmOS because of a 64k limitation on code size, the ultra-dumb non-flat 
memory model that m68k PalmOS uses, and the lack of a useful libc.  Is that a 
bug in pnet, or merely a design trade-off?  Some platforms are so horrid that 
"write your own CLI from scratch" is the only viable answer to "will pnet run 
on this?".

> > > to get a new platform.  It is that simple.
> I do not believe it ist the portable option.

I look forward to your patch. :-)



reply via email to

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