在X86下最多可用到3G
1)系统开机配置要使用/3GB开关 (bcdedit.exe /set ...)
2)程序编译时要用 /LARGEADDRESSAWARE 开关在64-bit windows下(目前)最多可用到7,8千G。
(兼容原因,系统默认保留2G,所以)也要用/LARGEADDRESSAWARE 开关宁外,对于大内存机器,是可以采用内存映射文件分段映射来管理总数大于4G的内存,只不过每次映射总要受到32位的局限。

解决方案 »

  1.   

    32位操作系统给最大的寻址范围为2^32=4G
    其中操作系统用2G 
    应用程序最大2G
    所以 换系统吧
      

  2.   

    目前intel的32位cpu支持的最大物理内存是64G,不是楼上面大家说的4G,这是因为从奔腾开始,就支持了物理地址扩展这项技术,使用一个"窗口"去访问大于4G的物理内存.要使用AWE必须设置windows的启动参数.下面是来自MSDN的:
    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的分段类似.
      

  3.   

    大企业用的sql server,甲骨文,web服务器都是会超过4GB物理内存的(跑在32位cpu上),见得多了.