views:

20

answers:

1

I am working on an MFC app that seems to be automagically committing to ~160MB of virtual memory. The app typically runs at 10-14MB of memory usage so this level of committed memory seems excessive. Additionally there is no where in the code where VirtualAlloc is called... COM & ATL are also being used.

The memory shows as committed the instance the process launches, before a breakpoint in __tmainCRTStartup can be reached.

How can this memory be reserved/committed?

Thanks in advance!

A: 

The only reason can be a DLL you use. I've used MFC 7.0 and 9.0 for many projects and can tell you that they don't commit this lot of memory.

Lothar
Found the issue in some legacy code that had a global stack array of a rather large size, which was committed to and never used unless a page fault occurred.
echobravo