Subject: Re: so what's happening...
To: None <port-pdp10@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-pdp10
Date: 07/06/2002 04:46:08
>> Using byte addresses in vaddr_t will cause problems because
>> vaddr_t foo; struct bar *ka = (struct bar *)foo;
>> won't do any conversion and set ka to a funny pointer.

> Hmmm. Reading my C ref manual (Harbison & Steele 2:nd ed) you could
> very well have special handling of conversions between different
> pointer types.

Yes.  I almost said the same thing, but thought I saw (in text I've
snipped) that vaddr_t was supposed to be an integral type.

However, vaddr_t could be a special type created for the purpose with
conversion rules equivalent to byte pointers....

> sizeof should return storage units.  That *could* mean words on a
> PDP-10.  If so, this would work just fine.

Yes, but that would also mean that chars would be 36 bits (by
definition, sizeof measures in units of chars), which would mean code
which stores one character per char would waste a lot of memory.  I
understand there _are_ compilers that do that, for things like DSPs
which are word-addressed, but I suspect the memory wastage for NetBSD
would be unsupportably high.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B