Virtual Address Space (Windows)

本文介绍32位Windows操作系统中进程的虚拟地址空间分配情况。默认情况下,4GB的地址空间分为两部分:2GB供进程使用,2GB保留给系统。启用4GB调优后,进程可用地址空间增加到3GB,而系统使用1GB。文章还介绍了如何通过BCDEdit命令调整进程可用的地址空间大小。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

The virtual address space for a process is the set of virtual memory addresses that it can use. The address space for each process is private and cannot be accessed by other processes unless it is shared.

A virtual address does not represent the actual physical location of an object in memory; instead, the system maintains apage table for each process, which is an internal data structure used to translate virtual addresses into their corresponding physical addresses. Each time a thread references an address, the system translates the virtual address to a physical address.

The virtual address space for 32-bit Windows is 4 gigabytes (GB) in size and divided into two partitions: one for use by the process and the other reserved for use by the system.

Default Virtual Address Space for 32-bit Windows

The following table shows the default memory range for each partition.

Memory rangeUsage
Low 2GB (0x00000000 through 0x7FFFFFFF)Used by the process.
High 2GB (0x80000000 through 0xFFFFFFFF)Used by the system.

 

Virtual Address Space for 32-bit Windows with 4GT

If 4-gigabyte tuning (4GT) is enabled, the memory range for each partition is as follows.

Memory rangeUsage
Low 3GB (0x00000000 through 0xBFFFFFFF)Used by the process.
High 1GB (0xC0000000 through 0xFFFFFFFF)Used by the system.

 

After 4GT is enabled, a process that has the IMAGE_FILE_LARGE_ADDRESS_AWARE flag set in its image header will have access to the additional 1 GB of memory above the low 2 GB.

Adjusting the Virtual Address Space for 32-bit Windows

You can use the following command to set a boot entry option that configures the size of the partition that is available for use by the process to a value between 2048 (2 GB) and 3072 (3 GB):

BCDEdit /set increaseuserva Megabytes

After the boot entry option is set, the memory range for each partition is as follows.

Memory rangeUsage
Low (0x00000000 through Megabytes)Used by the process.
High (Megabytes+1 through 0xFFFFFFFF)Used by the system.

 Windows Server 2003:  Set the /USERVA switch in boot.ini to a value between 2048 and 3072.

For more information about virtual memory, see the following topics:

Reference Link: http://msdn.microsoft.com/ZH-CN/library/windows/desktop/aa366912%28v=vs.85%29.aspx



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值