Article ID: 232351 - Last Review: April 7, 2006 - Revision: 4.4 FIX: Repeated Load and Unload of Mtxdm.dll Causes 1MB Virtual Memory Leak
This article was previously published under Q232351 On This PageSYMPTOMS
When loading and unloading Mtxdm.dll within a loop, a 1MB leak in virtual memory is seen with every iteration through the loop. This is most likely to occur in applications that are using an ODBC connection pooling and are making repeated connections and disconnections from the backend database, or ODBC applications that make many connections and disconnections to an Oracle backend. CAUSE
The leak in virtual memory is being caused by a call to TerminateThread() within Mtxdm.dll. When connection pooling is used within an ODBC application, the Dispenser Manager (Mtxdm.dll) is loaded to manage the connection pool, which is handled by a worker thread that is started within Mtxdm.dll. When the application ends, the worker thread is killed by a call to TerminateThread(), which will not clean up and free the 1MB of memory allocated for the worker thread's stack. This same behavior can be seen when making repeated connections and disconnections to an Oracle database server, because the Microsoft Oracle ODBC driver loads Mtxdm.dll whether connection pooling is being used or not. RESOLUTION
To resolve this problem, obtain the latest service pack for Windows NT 4.0 or
the individual software update. For information on obtaining the
latest service pack, please go to:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
(http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)
Windows NT Server or Workstation 4.0To resolve this problem, obtain the latest service pack for Windows NT 4.0 or the individual software update. For information on obtaining the latest service pack, please go to:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
(http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)
Windows NT Server 4.0, Terminal Server EditionTo resolve this problem, obtain the latest service pack for Windows NT Server 4.0, Terminal Server Edition. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:152734
(http://support.microsoft.com/kb/152734/EN-US/
)
How to Obtain the Latest Windows NT 4.0 Service Pack
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows NT Server version 4.0, Terminal Server Edition Service Pack 6. MORE INFORMATIONManual Installation of Hotfix 051099aNOTE: To obtain this hotfix, you must contact Microsoft Product Support Services. Please see the RESOLUTION section of this article for more information.
Steps to Reproduce BehaviorCreate a C/C++ console application using the following code. Run this application while using Performance Monitor to view Virtual Bytes for the application.NOTE: This code sample uses an ODBC data source that connects to an Oracle backend, because the Microsoft Oracle ODBC driver loads Mtxdm.dll, and more easily demonstrates the problem.
| Other Resources Other Support Sites
CommunityArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top