A hotfix is available that resolves the System.InsufficientMemoryException exception and enhances the heap balancing on a computer that has over 8 processors for the .NET Framework 2.0 Service Pack 2

Article translations Article translations
Article ID: 974065 - View products that this article applies to.
Expand all | Collapse all

On This Page

Introduction

This article describes a hotfix that resolves the following issues.

Issue 1

When you are running a .NET Framework 2.0-based application, the application crashes. If you debug the application, you notice that a System.InsufficientMemoryException exception is thrown. Then, you receive an error message that resembles the following:
Failed to allocate a managed memory buffer of <x> bytes. The amount of available memory may be low.

Issue 2

You run a .NET Framework 2.0-based application on a computer that has more than 8 logical processors. The computer uses the server garbage collector. In this case, you may experience a memory issue caused by an unbalanced workload in different processors. For example, the application runs slower than when you run the application on a computer that has 8 logical processors.

CAUSE

Cause of Issue 1

This issue occurs intermittently when the application tries to allocate memory for a large object in a large object heap (LOH). The error message is triggered when the following conditions are true:
  • The heap cannot provide sufficient memory to satisfy the LOH allocation request.
  • A concurrent garbage collection is in progress at the same time.

Cause of Issue 2

This issue occurs because garbage collector heap balancing for small object allocations is not performed diligently on computers that have more than 8 logical processors. Because of this, more garbage collections are triggered to maintain heap balancing when there is an unbalanced workload in different processors. Therefore, the application spends more time on garbage collection.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

You must have the .NET Framework 2.0 Service Pack 2 or the .NET Framework 3.5 Service Pack 1 installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
For all supported x86-based versions of Windows Server 2000, of Windows Server 2003, and of Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Mscordacwks.dll2.0.50727.4062989,52807-Aug-200904:40x86
Mscorlib.dll2.0.50727.40624,550,65607-Aug-200904:40x86
Mscorwks.dll2.0.50727.40625,818,70407-Aug-200904:40x86
Sos.dll2.0.50727.4062388,92007-Aug-200904:40x86

For all supported x64-based versions of Windows Server 2000, of Windows Server 2003, and of Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Mscordacwks.dll2.0.50727.40621,758,55207-Aug-200901:10x64
Mscorlib.dll2.0.50727.40624,567,04007-Aug-200901:05x64
Mscorwks.dll2.0.50727.406210,062,16007-Aug-200901:08x64
Sos.dll2.0.50727.4062485,19207-Aug-200901:06x64

For all supported Itanium-based versions of Windows Server 2000, of Windows Server 2003, and of Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Mscordacwks.dll2.0.50727.40623,085,12807-Aug-200900:35IA-64
Mscorlib.dll2.0.50727.40624,009,98407-Aug-200900:34IA-64
Mscorwks.dll2.0.50727.406220,172,60807-Aug-200900:31IA-64
Sos.dll2.0.50727.4062872,76007-Aug-200900:33IA-64

For all supported x86-based versions of Windows Vista SP2 and Windows Server 2008 SP2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Mscorlib.dll2.0.50727.44264,550,65603-Dec-200908:17
Mscordacwks.dll2.0.50727.4426989,01603-Dec-200908:17
Mscorwks.dll2.0.50727.44265,818,70403-Dec-200908:18
Sos.dll2.0.50727.4426388,93603-Dec-200908:18

For all supported x64-based versions of Windows Vista SP2 and Windows Server 2008 SP2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Mscorlib.dll2.0.50727.44264,567,04003-Dec-200908:17
Mscordacwks.dll2.0.50727.44261,758,55203-Dec-200908:17
Mscorwks.dll2.0.50727.442610,061,13603-Dec-200908:17
Sos.dll2.0.50727.4426485,19203-Dec-200908:17

For all supported Itanium-based versions of Windows Server 2008 SP2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Mscorlib.dll2.0.50727.44264,009,98403-Dec-200908:18
Mscordacwks.dll2.0.50727.44263,085,14403-Dec-200908:18
Mscorwks.dll2.0.50727.442620,173,13603-Dec-200908:18
Sos.dll2.0.50727.4426872,77603-Dec-200908:18

For all supported x86-based versions of Windows 7.0
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Mscorlib.dll2.0.50727.50014,550,65603-Dec-200905:01
Mscordacwks.dll2.0.50727.5001995,67203-Dec-200905:01
Mscorwks.dll2.0.50727.50015,821,77603-Dec-200905:01
Sos.dll2.0.50727.5001388,93603-Dec-200905:01

For all supported x64-based versions of Windows 7.0 and Windows Server 2008 R2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Mscorlib.dll2.0.50727.50014,567,04003-Dec-200909:26
Mscordacwks.dll2.0.50727.50011,757,52803-Dec-200909:26
Mscorwks.dll2.0.50727.500110,051,92003-Dec-200909:26
Sos.dll2.0.50727.5001485,19203-Dec-200909:26

For all supported Itanium-based versions of Windows Server 2008 R2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Mscorlib.dll2.0.50727.50014,009,98403-Dec-200904:59
Mscordacwks.dll2.0.50727.50013,086,16803-Dec-200904:59
Mscorwks.dll2.0.50727.500120,183,88803-Dec-200904:59
Sos.dll2.0.50727.5001872,77603-Dec-200904:59

MORE INFORMATION

You notice the garbage collector operation when you troubleshoot an application by using a debugger. For more information about the garbage collector operation, see the following Microsoft website:
http://blogs.msdn.com/b/maoni/archive/2005/05/06/415296.aspx

WORKAROUND

To work around Issue 1, disable the concurrent garbage collection for the common language runtime (CLR). To do this, you can reference the following Microsoft Web site:
http://msdn.microsoft.com/en-us/library/at1stbec.aspx

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 974065 - Last Review: October 1, 2010 - Revision: 4.0
APPLIES TO
  • Microsoft .NET Framework 2.0
  • Microsoft .NET Framework 2.0 Service Pack 1 (x86)
  • Microsoft .NET Framework 2.0 Service Pack 2
  • Microsoft .NET Framework 3.5 Service Pack 1
Keywords: 
kbexpertiseadvanced kbsurveynew kbqfe KB974065

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com