日期:2014-05-17  浏览次数:20696 次

基本概念理解:win32进程可以管理多少内存?
从MSDN上看到,PAE和AWE的相关资料。
感觉看得不是很明白。

疑问:
1。按照下文所述,如果不是Windows Server 2003 Enterprise Edition Windows Advanced Server, Limited Edition 
Windows 2000 Datacenter Server ,Windows 2000 Advanced Server 则无法使用PAE功能,那么是否意味着应用程序最大只能访问4GB的物理内存?
2。下文中,memory和physical memory究竟指的是什么概念?
3。按照下文所述,对于AWE,如果不支持PAE,则AWE无法预留大于4GB的物理内存。假设在没有使能PAE的情况下,物理内存有8GB,那么对于一个进程来说,该进程最大可以预留多少物理内存呢?4GB?该进程最大可以使用的内存有多少呢?4GB(扩展)+2GB(工作区)?

望各位大牛斧正!



附录:从MSDN摘取

Physical Address Extension
The Physical Address Extension (PAE) enables applications to address more than 4 GB of physical memory. It is supported by Intel processors. The following systems can use PAE to take advantage of physical memory beyond 4 GB:



Windows Server 2003 Enterprise Edition 
Windows Advanced Server, Limited Edition 
Windows 2000 Datacenter Server 
Windows 2000 Advanced Server 
To enable PAE, you must use the /PAE switch in the Boot.ini file.

With PAE enabled, the operating system moves from two-level linear address translation to three-level address translation. The extra layer of translation provides access to physical memory beyond 4 GB. Instead of a linear address being split into three separate fields for indexing into memory tables, it is split into four separate fields; a 2-bit field, two 9-bit fields, and a 12-bit field that corresponds to the page size implemented by Intel Architecture (4 KB).

Typically, a process can access up to 2 GB of memory address space (assuming the /3GB switch was not used), with some of the memory being physical memory and some being virtual memory. The memory manager uses PAE to provide more physical memory to an application, which reduces the need to swap memory to the page file and increases performance. The application itself is not aware of the actual memory size. All of the memory management and allocation of the PAE memory is handled by the memory manager independently of the application.

Applications that are 4GT-aware are likely to remain in physical memory rather than be paged out, which increases their performance. The exception is when the /3GB switch is used in conjunction with the /PAE switch. In this case, the operating system does not use any memory in excess of 16 GB. Therefore, if the system restarts with the /3GB entry in the Boot.ini file, and the system has more than 16 GB of physical memory, the additional physical random access memory (RAM) is not used by the operating system. Restarting the computer without the /3GB switch enables the use of all of the physical memory.

Address Windowing Extensions (AWE) enables applications to address more than 4 GB. AWE enables an application to reserve physical memory as nonpaged memory, then dynamically map portions of the nonpaged memory to its working set. This enables memory-intensive programs to reserve large amounts of physical memory for data without swapping to disk. Instead, the data is swapped between the working set and reserved memory above the 4 GB range. The memory above 4 GB is exposed to the memory manager and the AWE functions by PAE. Without PAE, AWE is unable to reserve memory in excess of 4 GB.


------解决方案--------------------
写好后提交,居然说无此帖
------解决方案--------------------
1.准确讲是3G多点,系统会把超过3G以上容量的内存优先分配给其他负责输入/输出的物理设备,从而导致实际上可使用的内存不足4G,这既受限于芯片组寻址能力,又受限于系统本身。只有在965以后的主板上,开启“Memory Remap(该功能可使中断的代码在不同的存储空间运行)”选项并且安装64位的xp/vista,才可以正确访问超过3G的内存;
2.memory:一个大概念——内存;
physical memory:一个小概念——物理内存,就是电脑内存条的存储空间;
免费奉送一个 virtual memory:虚拟内存,磁盘驱动器上映射出来的存储转换空间;
3.不讨论了,普通用户没那么大的进程……其实到底支持多大内存,不全是系统说了算,主板也很关键,而且PAE开关也不是万能的,得看硬件支不支持PAE。
------解决方案--------------------
3G多,对于个人系统来说,一般是够了
------解决方案------