积极答复者
关于程序虚拟内存的使用

问题
答案
-
- ullTotalVirtual
-
The size of the user-mode portion of the virtual address space of the calling process, in bytes. This value depends on the type of process, the type of processor, and the configuration of the operating system. For example, this value is approximately 2 GB for most 32-bit processes on an x86 processor and approximately 3 GB for 32-bit processes that are large address aware running on a system with 4-gigabyte tuning enabled.
- ullAvailVirtual
-
The amount of unreserved and uncommitted memory currently in the user-mode portion of the virtual address space of the calling process, in bytes.
- ullAvailExtendedVirtual
-
The amount of unreserved and uncommitted memory currently in the extended portion of the virtual address space of the calling process, in bytes.
根据你给出的三个数据,你当前用于测试GlobalMemoryStatusEx API 的程序总共占用了44M 的虚拟内存,因此最多还可使用2004M 虚拟内存。- 已标记为答案 SplendourGModerator 2010年2月1日 1:22
全部回复
-
- ullTotalVirtual
-
The size of the user-mode portion of the virtual address space of the calling process, in bytes. This value depends on the type of process, the type of processor, and the configuration of the operating system. For example, this value is approximately 2 GB for most 32-bit processes on an x86 processor and approximately 3 GB for 32-bit processes that are large address aware running on a system with 4-gigabyte tuning enabled.
- ullAvailVirtual
-
The amount of unreserved and uncommitted memory currently in the user-mode portion of the virtual address space of the calling process, in bytes.
- ullAvailExtendedVirtual
-
The amount of unreserved and uncommitted memory currently in the extended portion of the virtual address space of the calling process, in bytes.
根据你给出的三个数据,你当前用于测试GlobalMemoryStatusEx API 的程序总共占用了44M 的虚拟内存,因此最多还可使用2004M 虚拟内存。- 已标记为答案 SplendourGModerator 2010年2月1日 1:22
-
首先遍历所有进程,获得各个进程的句柄。然后调用GetProcessMemoryInfo
MSDN上有例子
http://msdn.microsoft.com/en-us/library/ms682050(VS.85).aspx
麻烦把正确答案设为解答。