Thursday, June 02, 2005

Memory footprint

That was two months ago, I need to reduce the memory footprint of one of my application. I checked the "Mem Usage" column in windows task manager, the result is surprsing: the process uses more than 10M just after it hits main().

The good news is it did not take me long to figure out that "Mem Usage" means the size of the current working set, which includes the shared data, dynamic libaries (DLL) for example.

Even the minimal hello world program requires lots of system dlls to run, so it takes about 1,000K after startup. If you add winsock, it soon becomes 1,500K.

The article of Joseph M. Newcomer explained the topic very well. And this one touched .NET.


Post a Comment

<< Home