Jump to content

GDI memory issues


Viper187

Recommended Posts

Am I the only one to experience this stupid issue? Half my RAM is free but I can't open anything else, not even Notepad or Task Manager. The only thing I've been able to figure is that the GDI memory is getting blown. I've heard the amount of RAM has no effect on it. I tried changing the GDIProcessHandleQuota and USERProcessHandleQuota at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows in the registry, but it didn't seem to help. What else can I do? I'm tired of closing things to open other things. I do a lot at once, and Firefox (among other things) seems to leak a lot of GDI objects and memory randomly. Could running Firefox or other programs as another user help?

Link to comment
Share on other sites


You have to remember that GDI isn't using "memory" as in *RAM*, but "memory" as in *Virtual Address Space*, which can be mapped into RAM or paged into the page file as the memory manager determines - remember that an application nor even the Windows kernel controls access to physical RAM, only the kernel memory manager does. The concept of "RAM" is foreign to the OS, it only understands "memory" as *Virtual Address Space". Note that also you have a *theoretical* limit of 65,536 GDI objects per session, and 10,000 per process - I say theoretical because you can indeed run out with fewer GDI objects consumed because each GDI object also consumes a small amount of kernel pool, so you can run out of available pool to service GDI objects sooner than the theoretical. You could increase the per-process object limit by modifying the GDIProcessHandleQuota value under HKLM\Software\Microsoft\Windows NT\CurrentVersion\Windows - note that you can add any number here for a limit, but anything above 12,000 will rarely give you any increase above this due to system resource constraints on x86.

Also, note that GDI is allocated out of desktop heap, and given the symptoms you provided it sounds more like you're hitting a resource limitation in desktop heap, rather than running out of GDI objects (you're failing to allocate desktop heap for new GDI objects, not hitting a GDI limitation itself). You could increase your desktop heap allocation in Session View space from 20MB all the way up to 48MB by modifying the registry key as per the link above. However, note that Session View space is limited on x86, and increasing desktop heap means you're decreasing some other portion of this resource region (allocated dynamically on boot). Also note I assume you would not be using the /3GB switch, which further reduces kernel memory space to 1GB, which means your session view space would be even more limited in it's allocations if you modify this resource.

I would suggest upgrading to an x64 Windows OS (and maybe adding a bit more RAM if necessary to support said OS) if you really need that many GDI-hungry applications open at once. The 32bit architecture has it's limits, and right now you're bumping into one of them.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...