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!
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.
原来有一些“遗留”代码使用自定义对象的静态数组分配了大约1000个额外的元素,因此将其更改为使用std :: vector可以完全缓解此问题...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.