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

Re: 64 bit->48 bit pointer hacks...



On Monday 03 October 2005 14:49, Dale E. Martin wrote:
> > The current generation AMD64 MMUs can only handle 64-bit pointers in
> > which the high-order 17 bits are all the same (40 bits of information).
>
> Is there some magic value I can write into "flag", that in combination with
> the understanding of how 64 bit pointers get truncated down to 48 bit
> virtual addresses that will allow me to store either a 7 byte string or a
> char * in the same space?


Euuh... I actually thought virtual adres space was... wel... virtual, and that 
the MMU could (and would) map real memory within virtual spaces at any 
location.

If that is true, then I don't think virtual adres space pointers are truncated 
at all, only pointers within physical adres space would. In other words, 
malloc() may return a pointer with very meaningfull bits above the 47nth bit. 

Only when actually accessing real RAM, beyond the MMU,  will any pointer never 
exceed the lower 48 bits.

Can anybody correct this ?

Ernest ter Kuile




Reply to: