Unauthorized memory allocation - Possible VC2005 bug? [modified]
-
[EDITTED] Got the answer in MSDN forum. It turns out I had a large global array, which I had defined earlier to test something and had forgotten about it! ah...bad programming practice!;P [/EDITTED] Hi, I have a relatively small Visual C++ project using MFC which allocates unusually hight amount of virtual memory as soon as the program starts(roughly 280MB), even before hitting the internal MFC stuff. When I debug them program in Visual Studio 2005 with a breakpoint at the beginning of int _tmainCRTStartup(void) function in crt0.c Windows Task Manager shows the following information: Memory Usage: 5,620K Peak Memory Usuage: 5,620K Page Faults: 1,420 VM Size: 282,360 K Paged Pool: 632K NP Pool: 2K Handles: 102 Threads: 1 GDI Object: 6 Running the program in release mode produces the same result. Also, compiler/linker settings are almost set to default. My question why the program allocates so much VM, before even its started WinMain() function? Is it a Windows issue or Visual C++? Any help appreciated! - Rob -- modified at 23:30 Saturday 16th September, 2006
-
[EDITTED] Got the answer in MSDN forum. It turns out I had a large global array, which I had defined earlier to test something and had forgotten about it! ah...bad programming practice!;P [/EDITTED] Hi, I have a relatively small Visual C++ project using MFC which allocates unusually hight amount of virtual memory as soon as the program starts(roughly 280MB), even before hitting the internal MFC stuff. When I debug them program in Visual Studio 2005 with a breakpoint at the beginning of int _tmainCRTStartup(void) function in crt0.c Windows Task Manager shows the following information: Memory Usage: 5,620K Peak Memory Usuage: 5,620K Page Faults: 1,420 VM Size: 282,360 K Paged Pool: 632K NP Pool: 2K Handles: 102 Threads: 1 GDI Object: 6 Running the program in release mode produces the same result. Also, compiler/linker settings are almost set to default. My question why the program allocates so much VM, before even its started WinMain() function? Is it a Windows issue or Visual C++? Any help appreciated! - Rob -- modified at 23:30 Saturday 16th September, 2006
This is neither a windows or VC++ issue since it's not normal for a "plain" app unless you are using extensive DLLs especially from third party.
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
This is neither a windows or VC++ issue since it's not normal for a "plain" app unless you are using extensive DLLs especially from third party.
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
I am only using one thirdparty DLL coded by myself. SO I will have to investigate that. Thanks for the lead.