在X86下最多可用到3G
1)系统开机配置要使用/3GB开关 (bcdedit.exe /set ...)
2)程序编译时要用 /LARGEADDRESSAWARE 开关在64-bit windows下(目前)最多可用到7,8千G。
(兼容原因,系统默认保留2G,所以)也要用/LARGEADDRESSAWARE 开关宁外,对于大内存机器,是可以采用内存映射文件分段映射来管理总数大于4G的内存,只不过每次映射总要受到32位的局限。
1)系统开机配置要使用/3GB开关 (bcdedit.exe /set ...)
2)程序编译时要用 /LARGEADDRESSAWARE 开关在64-bit windows下(目前)最多可用到7,8千G。
(兼容原因,系统默认保留2G,所以)也要用/LARGEADDRESSAWARE 开关宁外,对于大内存机器,是可以采用内存映射文件分段映射来管理总数大于4G的内存,只不过每次映射总要受到32位的局限。
其中操作系统用2G
应用程序最大2G
所以 换系统吧
March 30, 1999Windows® Hardware Engineering Conference: Advancing the PlatformSummary This article addresses memory space issues in Microsoft® Windows® 2000 Datacenter Server, focusing on the Address Windowing Extensions (AWE) API set, which allows user applications to use up to 64 GB of physical non-paged memory in a 32-bit virtual address space on 32-bit platforms, with windowed views to this physical memory from within the application’s virtual address space. (16 printed pages)下面是AWE API
Address Windowing Extensions API
The following list summarizes the Address Windowing Extensions API set: VirtualAlloc with MEM_PHYSICAL flag
AllocateUserPhysicalPages as described in the Windows Platform SDK
MapUserPhysicalPages as described in the Windows Platform SDK
FreeUserPhysicalPages as described in the Windows Platform SDK
AllocateUserPhysicalPages and FreeUserPhysicalPages have a general format similar to the following:(
IN HANDLE hProcess, // process within which to allocate memory
IN OUT PULONG_PTR NumberOfPages, // size, in pages, of the physical memory to allocate
OUT PULONG_PTR UserPfnArray // user address to store the allocated frame numbers in
);
但是虽然可以使用64GB内存,但是使用窗口来"映射",这个和8086CPU的分段类似.