================================================
“狗屁虚存”么,那个是通过paging实现的,这个是另外一种东西。我先问一句,你对Intel的Architecture Software Developer's Manual不存在什么异议吧?如果你不承认这个东西,我下面说得你就不用看了,基本上都是来自那里:
When operating in protected mode, IA-32 architecture permits linear address space to be mapped directly into a large physical memory (for example, 4 GBytes of RAM) or indirectly
(using paging) into a smaller physical memory and disk storage. This latter method of mapping the linear address space is referred to as virtual memory or demand-paged virtual memory.
我觉得这样说有点问题。段是逻辑地址的概念,线性地址是没有段这个东西的,虽然在地址总线32位的情况下,线性地址空间是4G,但每个线性地址对应很多个逻辑地址,这些逻辑地址都对应相同的线性地址,对这些逻辑地址相互之间来说,的确是彼此不同的,64T是逻辑地址的空间,不是线性地址的空间。
================================================
不知道你否定的是我的话还是Intel的话(我估计应该是我的)。但是似乎只看了最后一句话,前面还有一句“The processor translates every logical address into a linear address”你没看到么?不过段允许重合,如果算上这个,逻辑地址的确可以达到64T,所有的描述符全都一样不就行了么?如果给你三个容量都为n的口袋,其中前两个装完东西以后要放入第三个,你认为你可以在这里放超过n的东西么?作为代码来说,共享空间也就算了,但是对于一个可以说系统中唯一存在的程序(其他的暂时都忽略吧)把存放数据的段再重复的话没什么意思吧?所以我在上面说这个和浮点数差不多都素那浮云阿浮云,也不是没道理吧?
6.5.3.2 Address and indirection operators
Constraints
1 The operand of the unary & operator shall be either a function designator, the result of a [] or unary * operator, or an lvalue that designates an object that is not a bit-field and is not declared with the register storage-class specifier.
2 The operand of the unary * operator shall have pointer type.
Semantics
3 The unary & operator returns the address of its operand. If the operand has ype 'type', the result has type 'pointer to type'. If the operand is the result of a unary * operator, neither that operator nor the & operator is evaluated and the result is as if both were omitted, except that the constraints on the operators still apply and the result is not an lvalue.
Similarly, if the operand is the result of a [] operator, neither the & operator nor the unary * that is implied by the [] is evaluated and the result is as if the & operator were removed and the [] operator were changed to a + operator. Otherwise, the result is a pointer to the object or function designated by its operand.
4 The unary * operator denotes indirection. If the operand points to a function, the result is a function designator; if it points to an object, the result is an lvalue designating the object. If the operand has type 'pointer to type', the result has type 'type'. If an invalid value has been assigned to the pointer, the behavior of the unary * operator is undefined.)