You are currently offline, waiting for your internet to reconnect

"Out of Memory" error message appears when you have a large number of programs running

Support for Windows XP has ended

Microsoft ended support for Windows XP on April 8, 2014. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

Support for Windows Server 2003 ended on July 14, 2015

Microsoft ended support for Windows Server 2003 on July 14, 2015. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

This article was previously published under Q126962
SYMPTOMS
When you run a large number of Windows-based programs, "Out Of Memory"error messages appear when you attempt to start new programs or try to useprograms that are already running, even though you still have plenty ofphysical and pagefile memory available.
CAUSE
This behavior can occur if the desktop heap in the WIN32 subsystem isdepleted.

Note This problem occurs more often under Windows NT 3.5 as the default size of the desktop heap is 512K. Under Windows NT 3.1 the default value is 3072K. The default was reduced to increase performance.
RESOLUTION
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
To have us fix this problem for you, go to the "Fix it for me" section. If you prefer to fix this problem yourself, go to the "Let me fix it myself" section.

Fix it for me



To fix this problem automatically, click the Fix itbutton or link. Click Runin the File Download dialog box, and follow the steps in the Fix it wizard.


Notes
  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.
  • If you are not on the computer that has the problem, save the Fix it solution to a flash drive or a CD and then run it on the computer that has the problem.
  • If this still did not fix the problem for you, please increase the memory for your computer.

Then, go to the "Did this fix the problem?" section.



Let me fix it myself

To correct this problem, increase the size of the desktop heap:
  1. Run Registry Editor (Regedt32.exe).
  2. From the
    HKEY_LOCAL_MACHINE
    subtree, go to the following key:
    \System\CurrentControlSet\Control\Session Manager\SubSystems
  3. Select the Windows value.
  4. From the Edit menu, choose String.
  5. Increase the SharedSection parameter.

    For Windows NT:
    SharedSection specifies the system and desktop heaps using the following format:
    SharedSection=xxxx,yyyy
    Add ",256" or ",512" after the yyyy number.

    For Windows 2000, Windows XP, and Windows Server 2003:
    SharedSection uses the following format to specify the system and desktop heaps:
    SharedSection=xxxx,yyyy,zzzz
    For 32-bit operating systems, increase the yyyy value to "12288";
    Increase the zzzz value to "1024".
    For 64-bit operating systems, increase the yyyy value to "20480";
    Increase the zzzz value to "1024".
MORE INFORMATION
Windows NT uses a special memory heap for all Windows-based programsrunning on the desktop. The desktop heap is used for all objects (windows,menus, pens, icons, etc.). When a large number of Windows-basedprograms are running, this heap may run out of memory. When there isnot enough memory to satisfy an allocation request, the system normallyreturns an error and notifies the user that they are running low onmemory. Some programs do not handle the failure gracefully, and in somecases there may not be enough memory to create the error message dialog box. As a result, the requested operation fails without any indication.

The SharedSection key is a long string when viewed using Registry Editor.The default value for this key is as follows.
   %SystemRoot%\system32\csrss.exe   ObjectDirectory=\Windows   SharedSection=1024,3072,512   Windows=On   SubSystemType=Windows   ServerDll=basesrv,1   ServerDll=winsrv:GdiServerDllInitialization,4   ServerDll=winsrv:UserServerDllInitialization,3   ServerDll=winsrv:ConServerDllInitialization,2   ProfileControl=Off   MaxRequestThreads=16				


The first SharedSection value (1024) defines the heap size common to alldesktops. This includes the global handle table (Window handles are uniquemachine wide) and shared system settings (such as SystemMetrics). It isunlikely you would ever need to change this value.

The second SharedSection value (3072) controls the size of the desktopheap that is associated with an interactive window station (used for Windows objects). This static value is used to prevent ill- behaved applications from consuming too many resources. Because the desktop heap is mapped into each process' address space, this value should not be set to an arbitrarily high value (as it would decrease performance), but should only be increased sufficiently to allow all the desired applications to run.

The third SharedSection value (512) controls the size of the desktop heap for each desktop that is associated with a "non-interactive" window station. If this value is not present, the size of the desktop heap for non-interactive window stations will be same as the size specified for interactive window stations (the second SharedSection value).
For more information about the parameters of the SharedSection key, click the following article number to view the article in the Microsoft Knowledge Base:
184802 PRB: User32.dll or Kernel32.dll fails to initialize

Did this fix the problem?

  • Check whether the problem is fixed. If the problem is fixed, you are finished with this section. If the problem is not fixed, you can contact support.
  • We would appreciate your feedback. To provide feedback or to report any issues with this solution, please leave a comment on the "Fix it for me" blog or send us an email.
prodnt low failure fixed size page file fixit fix it fixme
Properties

Article ID: 126962 - Last Review: 09/14/2010 09:49:00 - Revision: 4.0

Microsoft Windows 2000 Server, Microsoft Windows 2000 Advanced Server, Microsoft Windows 2000 Professional Edition, Microsoft Windows NT Workstation 3.5, Microsoft Windows NT Workstation 3.51, Microsoft Windows NT Workstation 4.0 Developer Edition, Microsoft Windows NT Server 3.51, Microsoft Windows NT Server 4.0 Standard Edition, Microsoft Windows NT Advanced Server 3.1, Microsoft Windows XP Home Edition, Microsoft Windows XP Professional, Microsoft Windows Server 2003, Datacenter Edition (32-bit x86), Microsoft Windows Server 2003, Enterprise Edition (32-bit x86), Microsoft Windows Server 2003, Standard Edition (32-bit x86), Microsoft Windows Server 2003, Web Edition

  • kbenv kbmsifixme kbfixme KB126962
Feedback
varClickTracking = 1; var varCustomerTracking = 1; var Route = "76500"; var Ctrl = ""; document.write(" $index" class="col-sm-6 col-xs-24 ng-scope"> 香港特別行政區 - 繁體中文
El Salvador - Español
Panamá - Español
Uruguay - Español
대한민국 - 한국어
España - Español
Paraguay - Español
Venezuela - Español
://c1.microsoft.com/c.gif?DI=4050&did=1&t=">var varClickTracking = 1; var varCustomerTracking = 1; var Route = "76500"; var Ctrl = ""; document.write(" ad="var m=document.createElement('meta');m.name='ms.dqp0';m.content='false';document.getElementsByTagName('head')[0].appendChild(m);" src="http://c1.microsoft.com/c.gif?"> ne; " src="https://c1.microsoft.com/c.gif?DI=4050&did=1&t=">