www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Could we get a LP64 version identifier?

reply bearophile <bearophileHUGS lycos.com> writes:
Walter Bright:
 Frits van Bommel:
 [1]: Hey, x86 technically has 6-byte pointers if you count segments as 
 part of the pointer (which would be mostly useless on currently popular 
 operating systems though).

It does, but I know of no compiler that supports that (C, C++, or any other), and code that needs to deal with that tends to be assembler.

16 free bits suggest various possible usages, for example the length for small strings/arrays, halving the size of the array struct. Bye, bearophile
Jan 27 2009
next sibling parent Don <nospam nospam.com> writes:
bearophile wrote:
 Walter Bright:
 Frits van Bommel:
 [1]: Hey, x86 technically has 6-byte pointers if you count segments as 
 part of the pointer (which would be mostly useless on currently popular 
 operating systems though).

other), and code that needs to deal with that tends to be assembler.

16 free bits suggest various possible usages, for example the length for small strings/arrays, halving the size of the array struct. Bye, bearophile

They're not free bits. Those bits are in the segment registers, not in the pointer registers. Only the OS can change the segment registers. And it's a slow operation.
Jan 27 2009
prev sibling parent Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
bearophile wrote:
 Walter Bright:
 Frits van Bommel:
 [1]: Hey, x86 technically has 6-byte pointers if you count segments as 
 part of the pointer (which would be mostly useless on currently popular 
 operating systems though).

other), and code that needs to deal with that tends to be assembler.

16 free bits suggest various possible usages, for example the length for small strings/arrays, halving the size of the array struct.

It's not that there are 16 extra bits available, it's that technically to specify a memory location you need to specify 16 more bits in one of a couple special registers. In practice though, these are pretty much always the same (or equivalent, at least).
Jan 27 2009