A
Alf P. Steinbach
* Rainer Weikusat:
I'm sorry, that's incorrect.
The number of bits per pointer depends on your language and pointer type.
Certainly in assembler you can use them
; with MASM-like syntax the DP
directive allocates 6 bytes for a pointer. And any compiler for a language with
sufficiently flexible language definition, e.g. C or C++, can support them.
That's right for the ole' 386, but the "because" is just silly.
You know, 64 GiB => 36 bits per physical address.
So this quote quote does not support your position, but James'. And I think the
issue discussed in this paragraph is what James was referring to, although it
appears that he stumbled on the Intel-specific terminology. He should have
referred to physical addresses, not linear addresses.
And so it happens that in spite of the incorrect arguments/terminology,
regarding the factual it seems that you're both at least partially right, heh.
Cheers & hth.,
- Alf
James Kanze said:C++ just follows C here. But as you say, the language was* Pawel Dziepak:
Segmentation is not present in some architectures and
creates some additional problems if you want to implement
high-level language that can use many different segments.
Since this is wildly cross-posted I'd better mention I'm
posting in [comp.lang.c++].
C++ is to some extent influenced by the possibility of a
segmented architecture, by separating code and data pointers.
Formally, void* can hold a data pointer, but not a code
pointer. So in a sense C++ is designed for this...
designed so as not to impose a linear addressing model. I've
actually used C and C++ on an Intel 80386 with 48 bit pointers
(and so, at the time---before long long, no integral type was
big enough to hold a pointer). From a QoI point of view, one
would expect all OS's to support this.
There are no 48-bit pointers on 80386 or later,
I'm sorry, that's incorrect.
The number of bits per pointer depends on your language and pointer type.
Certainly in assembler you can use them
directive allocates 6 bytes for a pointer. And any compiler for a language with
sufficiently flexible language definition, e.g. C or C++, can support them.
because the
segmentffset-address is only used to calculate a 32-bit linear
address.
That's right for the ole' 386, but the "because" is just silly.
Directly quoting from the relevant section (Intel® 64 and IA-32
Architectures Software Developer's Manual, Volume 1: Basic
Architecture, 3.3.6):
Beginning with P6 family processors, the IA-32 architecture
supports addressing of up to 64 GBytes (236 bytes) of physical
memory. A program or task could not address locations in this
address space directly. Instead, it addresses individual
linear address spaces of up to 4 GBytes that mapped to
64-GByte physical address space through a virtual memory
management mechanism. Using this mechanism, an operating
system can enable a program to switch 4-GByte linear address
spaces within 64-GByte physical address space.
You know, 64 GiB => 36 bits per physical address.
So this quote quote does not support your position, but James'. And I think the
issue discussed in this paragraph is what James was referring to, although it
appears that he stumbled on the Intel-specific terminology. He should have
referred to physical addresses, not linear addresses.
And so it happens that in spite of the incorrect arguments/terminology,
regarding the factual it seems that you're both at least partially right, heh.
Cheers & hth.,
- Alf