views:

101

answers:

2

I've developed a small application in C# (.net 3.5) which runs in the system tray. Basically it just checks a rss-feed every 5 minutes, and if there's a new feed since the last time it checked, it displays a balloontip, and also uses the text-to-speech engine in .net 3.0/3.5 to read the headline of the fetched feed.

It works fine, but I've noticed that on Windows7 it takes about 9-10mb while running, but in XP it takes 39-40mb. I have no clue why. Does anybody know anything about what this might be?

+5  A: 

Maybe because windows 7 uses .net in some of its components, so a lot of memory is shared between your process and the system.

In XP all the .Net assembly are not loaded by some process of the system, so the memory appears as private in your process.

munissor
Hmm..ok, that seems logic, thank you!
Svein Erik
You can check the memory usage of your process with VmMap from Sysinternals (http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx) or (more advanced tool) with WinDBG with SOS extension.
munissor
+1  A: 

Are your readings from the Mem Usage column in the taskmanager? Then you are looking at the working set size. The amount of active memory used by the application loaded into RAM. This might not be what you want to compare. Try minimizing your application. See how the Mem Usage drops significantly. It does not mean the applications is using less memory once you minimize it. It means that Windows thinks you are not going to use the application any time soon and swaps the memory from RAM to the paging file. You might want to check out the VM Size column to compare. Of course you can still ask yourself the question why the working set size differs, but that question is a lot harder to answer. Also see here for an explanation of the different memory readings.

Lars Truijens