【问题标题】:flat memory model vs. real-address mode memory model平面内存模型与实地址模式内存模型
【发布时间】:2014-05-26 03:59:10
【问题描述】:

来自英特尔 IA32 软件开发人员手册

Flat memory model — Memory appears to a program as a single, continuous address  
space. This space is called a linear address space. Code, data, and stacks are  
all contained in this address space. Linear address space is byte addressable,  
with addresses running contiguously from 0 to 2^32 - 1 (if not in 64-bit mode).  
An address for any byte in linear address space is called a linear address.

Real-address mode memory model — This is the memory model for the Intel 8086  
processor. It is supported to provide compatibility with existing programs  
written to run on the Intel 8086 processor. The realaddress mode uses a specific  
implementation of segmented memory in which the linear address space for the  
program and the operating system/executive consists of an array of segments of up  
to 64 KBytes in size each. The maximum size of the linear address space in  
real-address mode is 220 bytes.

根据上面的信息,这两种内存模型的区别仅仅是可寻址的内存空间大小吗?

【问题讨论】:

    标签: memory-management operating-system intel


    【解决方案1】:

    实地址模式也使用段。

    平面内存模型是大多数处理器(不是来自英特尔)使用的直观、直接的内存模型。大多数处理器不支持多种内存模型。英特尔支持这一点以及许多其他兼容性。

    实地址模式使用段寄存器。地址是程序员指定的值加上段寄存器中的值,在某些情况下,段可能是特定指令隐含的。

    【讨论】:

    • 我可以将平面内存模型视为实地址模式内存模型的无段版本的巨型地址空间吗?
    • 我不会将平面内存模型称为实地址模式的一个版本。这是普通的香草记忆模型。实模式是一种允许 16 位处理器访问比 64K 更多内存的 hack。 (想想如果 IBM 采用 68000 而不是 8086,这个行业会走多远)。
    • flat momory模型中,代码、数据和堆栈在同一个内存范围内(通常为0~4GB),应用程序应该自己管理它的代码、数据和堆栈以防止混乱。我说的对吗?
    猜你喜欢
    • 2013-08-27
    • 1970-01-01
    • 2011-02-28
    • 2018-07-07
    • 2020-10-10
    • 2010-11-06
    • 2012-01-07
    • 2012-08-11
    • 2021-06-24
    相关资源
    最近更新 更多