Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Many of my application are appearing to not be able to allocate memory. This ranges from missing buttons/toolbars in explorer, other apps not starting at all, etc. WinSCP actually gives the most detailed error message:

Error reading ListingCommandEdit->Items.Strings: System Error. Code: 8. Not enough storage is available to process this command.

The latter text is the generic error text for the system error ERROR_NOT_ENOUGH_MEMORY. Now here's the problem: I have plenty of memory.

Popping up Process Explorer reveals 650 MB of free RAM, and another 200 MB in cache. The pagefile has another 1.5 GB according to Process Explorer. The disk holding the pagefile (C:) has 137 GB of free space.

My next thought was handles: perhaps there's a limit there? I have 30k of them, again, according to PE, but a quick test app says I can allocate at least another 30k.

So... what exactly am I out of? Yes, there's a lot running, but if I have the resources available for more, then I don't expect to see errors.

share|improve this question
"Spurious of out memory"? Somehow I think you meant "Spurious out of memory"… – Hello71 Aug 4 '10 at 15:10
Somehow I think you might be right. Thanks! – Thanatos Aug 11 '10 at 4:48
up vote 3 down vote accepted

Apparently, Windows has something called a "Desktop Heap", which is by default 3 MiB. Information on things such as HWNDs (windows, buttons, text, edit boxes, check boxes, radio buttons, you name it) are stored here - if you exhaust this, you can't create any more Windows, and thus things stop running.

This is a set limit - nothing useful like it expanding the heap happens. Thankfully, it's reconfigurable, at the cost of a reboot. It's a registry tweak to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\Windows.

If you need to know if this is what is affecting you, get the dheapmon tool from Microsoft, available here:

A better article on how to run it:

And lastly, how to tweak that registry key to make things work:

share|improve this answer

Have you run a memory test? memtest is one such utility.

It could be that you're getting errors which aren't showing up when you look for free space. The application could report them better, but they might not be distinguishable to the code.

It would ask for X bytes and if it didn't get the required amount it would assume there wasn't enough rather then there being a problem with the memory.

share|improve this answer
Haven't tried memtest. Allocations of memory work fine: I can allocate (and then utilize) several hundred megabytes of memory. – Thanatos Jul 1 '10 at 19:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .