msvcrt: memory usage goes wild, but not under debugger

Posted by al_miro on Stack Overflow See other posts from Stack Overflow or by al_miro
Published on 2010-05-06T09:16:17Z Indexed on 2010/05/06 9:18 UTC
Read the original article Hit count: 345

Filed under:
|
|
|

I have a C++ code compiled with Intel compiler, 32bit, in MS VC6 mode, so using either msvcrt.dll or msvcrtd.dll. The process makes heavy memory allocation and deallocation. I monitor the memory usage with WMI and look at VirtualSize and WorkingSetSize.

with debug runtime (msvcrtd.dll): virtual constant 1.7GB, working constant 1.2GB
with non-debug runtime (msvcrt.dll): virtual raising 1.7-- 2.1GB, working raising 1.2-1.4GB
with non-debug runtime but under debugger (windbg): virtual constant 1.7GB, working constant

At 2.1 GB virtual the process is crashing (as expected). But why would the virtual usage increase only with (non-debug) msvcrt.dll and only if not under debugger? In all cases compilation flags are identical, only runtime libs are different.

© Stack Overflow or respective owner

Related posts about memory-usage

Related posts about c++