Saturday, January 23, 2010

Useful Articles on Memory Management in Windows

Trying to combat handle leakage from older Windows apps, I did find some useful Windows tweaks that at least apply to XP & 2003, but may also have use for 2008 / Vista / 7. These involve registry editing: if you don't know what I'm talking about, read the source articles or do not attempt!

Added 1-31-2009: hotfix for data objects

For older programs using databases, Vista / 2008 / 7 can choke up after a while. This hotfix seems to be helping with my 60-user appserver: it hasn't needed a reboot in a week!

Session Manager tweak

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems

Look in the "Windows" string and change the middle number of "SharedSection=1024,3072,512" to 12288 to match Vista/2008's setting; 32-bit users may be able to push it a little further, but 64-bit users can probably go to 65535. System instability may result with a bad setting.

GDI and other handle tweaks

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows

Change all the values that say 10000 to 16384: be sure to set it to Decimal when you edit each setting.


* ASP.NET article on GDI handle limits & Session Manager tweak
* Rage3d thread on Session Manager tweak

Articles on Windows Memory Management

EDITED: found more articles in the series & linking to them

Mark Russinovich has as nice series on how Windows manages memory: keep these in mind regarding the 4GB limit on 32-bit systems; handle limits; etc.

* Physical Memory
* Virtual Memory
* Paged / Non-Paged Pool
* Processes & Threads
* Handles

ADDED: found references for modifying EXE flags


*Discussion on modifying EXEs for /3GB & large address support
*EDITBIN options reference
*Visual Studio Express C++ has dumpbin & editbin

No comments:

Post a Comment