Question

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!

Was it helpful?

Solution 2

Turned out there was some "legacy" code using a static array of custom objects that allocated around 1000 extra elements, so changing this to use a std::vector alleviated this issue completely...

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top