Re: Paying developers to get features faster
From: Bill Unruh (unruh_at_string.physics.ubc.ca)
Date: 01/25/04
- Next message: David Oxley: "LD_PRELOAD & Sockets"
- Previous message: Bill Unruh: "Re: Paying developers to get features faster"
- In reply to: Barry Margolin: "Re: Paying developers to get features faster"
- Next in thread: Måns Rullgård: "Re: Paying developers to get features faster"
- Reply: Måns Rullgård: "Re: Paying developers to get features faster"
- Reply: John Winters: "Re: Paying developers to get features faster"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 25 Jan 2004 17:16:12 +0000 (UTC)
Barry Margolin <barmar@alum.mit.edu> writes:
]In article <5ih610dbsgsg0q0q8o55oes7ufejrt0a77@4ax.com>,
] Brad Olin <bwo@bwo1.com> wrote:
]> Are you sure? The case I was referring to was a page mode address
]> processor. Page zero, offset zero was a valid RAM address and you were
]> allowed to point to it. That package defined NULL as something like...
]>
]> #define NULL const (void *)0x800000
]This is a violation of the ANSI/ISO C specification. It says that a
]null pointer is an integer constant zero or an integer constant zero
]cast to void*, and that the NULL macro expands to one of these (there's
]been a thread for the past 3-4 weeks in comp.std.c about this, and all
]the experts agree on this).
]> As I remember it, they had an on-chip MMU that trap'd or NMI'd the CPU
]> if you read/wrote with the MSB set. It's been a few years and I no
]> longer have access to that project.
]The compiler is supposed to translate the syntactic representation of
]the null pointer to the appropriate binary representation. So when it
]see (void*)0 or 0 in a pointer context, it should generate code that
]uses 0x800000 internally if that's what the CPU requires.
So, how do you point to the valid pointer value 0?
In his case he clearly needs to differentiate between an invalid pointer
and the pointer value of 0, and be able to use both in the program.
Simply making the pointer value 0 be an impossible pointer value does
not solve the problem.
- Next message: David Oxley: "LD_PRELOAD & Sockets"
- Previous message: Bill Unruh: "Re: Paying developers to get features faster"
- In reply to: Barry Margolin: "Re: Paying developers to get features faster"
- Next in thread: Måns Rullgård: "Re: Paying developers to get features faster"
- Reply: Måns Rullgård: "Re: Paying developers to get features faster"
- Reply: John Winters: "Re: Paying developers to get features faster"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|