FIX: High memory usage when the Thread.AllocateDataSlot method allocates data slots in the .NET Framework 4

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

On This Page

SYMPTOMS

After an application calls the Thread.AllocateDataSlot method to allocate a data slot in the Microsoft .NET Framework 4, the memory usage and the CPU usage keep increasing. When debug information is generated, the debug information indicates that a large number of the System.LocalDataStoreElement types occupy memory.

CAUSE

This issue occurs because the Thread.AllocateDataSlot method in the .NET Framework 4 creates a memory leak.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, 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

To apply this hotfix, you must have the Microsoft .NET Framework 4 installed.

Restart requirement

You must restart the computer after you install this hotfix if the affected files are being used.

We recommend that you close all .NET Framework applications before you install this hotfix.

File information

The global version of this 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 XP, of Windows Server 2003, of Windows Vista, of Windows Server 2008, and of Windows 7
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Clr.dll4.0.30319.4766,735,17608-Jun-201114:59x86
Cordacwks.dll4.0.30319.4761,142,61608-Jun-201114:59x86
Mscordbi.dll4.0.30319.476955,72808-Jun-201114:59x86
Mscorlib.dll4.0.30319.4765,198,67208-Jun-201114:59x86
Nlssorting.dll4.0.30319.47656,14408-Jun-201114:59x86
Sos.dll4.0.30319.476516,93608-Jun-201114:59x86
For all supported x64-based versions of Windows XP, of Windows Server 2003, of Windows Vista, of Windows Server 2008, of Windows 7, and of Windows Server 2008 R2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Clr.dll4.0.30319.4766,735,17608-Jun-201114:59x86
Clr.dll4.0.30319.4769,801,03208-Jun-201122:38x64
Cordacwks.dll4.0.30319.4761,142,61608-Jun-201114:59x86
Cordacwks.dll4.0.30319.4761,514,84008-Jun-201122:38x64
Mscordbi.dll4.0.30319.476955,72808-Jun-201114:59x86
Mscordbi.dll4.0.30319.4761,454,41608-Jun-201122:38x64
Mscorlib.dll4.0.30319.4765,198,67208-Jun-201114:59x86
Mscorlib.dll4.0.30319.4764,968,27208-Jun-201122:38x64
Nlssorting.dll4.0.30319.47656,14408-Jun-201114:59x86
Nlssorting.dll4.0.30319.47667,40808-Jun-201122:38x64
Sos.dll4.0.30319.476516,93608-Jun-201114:59x86
Sos.dll4.0.30319.476597,83208-Jun-201122:38x64
For all supported IA-64–based versions of Windows Server 2003, of Windows Server 2008, and of Windows Server 2008 R2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Clr.dll4.0.30319.4766,735,17608-Jun-201114:59x86
Clr.dll4.0.30319.47619,388,74409-Jun-201106:05IA-64
Cordacwks.dll4.0.30319.4761,142,61608-Jun-201114:59x86
Cordacwks.dll4.0.30319.4763,758,42409-Jun-201106:05IA-64
Mscordbi.dll4.0.30319.476955,72808-Jun-201114:59x86
Mscordbi.dll4.0.30319.4763,295,56809-Jun-201106:05IA-64
Mscorlib.dll4.0.30319.4765,198,67208-Jun-201114:59x86
Mscorlib.dll4.0.30319.4764,466,51209-Jun-201106:05IA-64
Mscorlib.resources.dll4.0.30319.476306,01608-Jun-201108:15x86
Nlssorting.dll4.0.30319.47656,14408-Jun-201114:59x86
Nlssorting.dll4.0.30319.476143,18409-Jun-201106:05IA-64
Sos.dll4.0.30319.476516,93608-Jun-201114:59x86
Sos.dll4.0.30319.4761,203,01609-Jun-201106:05IA-64


WORKAROUND

To work around this issue, use the related methods in the System.Threading.ThreadLocal class to allocate data slot.

STATUS

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

Properties

Article ID: 2540745 - Last Review: June 28, 2011 - Revision: 1.0
APPLIES TO
  • Microsoft .NET Framework 4
Keywords: 
kbqfe kbhotfixserver kbfix kbexpertiseadvanced kbsurveynew KB2540745

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