October 24, 2006

Lots of RAM for .Net Programs

Filed under: .Net,Programming — pj @ 1:27 pm

Developing in .net and C# is OK, but every little utility uses 20MB of RAM… it’s such a waste. I’ve got this little ping utility that is just a few files of C# code… the .net code isn’t much different than it would be in MFC (or a text base UI like curses for that matter). Internally, the program uses almost no RAM – just a list of hosts and a few settings and statistics for each host.

But my little .net app uses 19MB RAM and that’s for the “release” build. It makes .net apps easy to find in Task Manager, though…. just sort the process list by RAM usage – my ping utility is #2 (2nd to MSN messenger).

The same program in C would¬†¬†probably use less than 512 KB. In C++ with MFC I’d guess 2 MB or less. Using a Virtual Machine is supposed to be safer than running native code, but there sure must be a lot of room for exploits with an “extra” 17 MB or so of code (or something) loaded into RAM…

Powered by Teztech