Memrory Use Question

Oct 22, 2007 at 9:54 PM
Just a question. What dictates how much memory Virtual Desktops uses? The amount used varies wildly and I can't make sense of what causes it. Not a problem (I've got lots of memory) - just wondering.

Michael Grant
Oct 23, 2007 at 2:52 AM
Edited Oct 23, 2007 at 2:52 AM
Exactly what do you mean by "varies wildly?" On my PC it uses anywhere from 232KB to 8+MB. For what the program does, and bearing in mind that this most Windows apps tend to be heavy on RAM requirements, that's pretty good. And unless you're running the bare minimum RAM for whatever Windows version you have, even the larger number shouldn't been an issue. Vista Home Premium with 1.5GB RAM on my end.
Oct 23, 2007 at 5:04 PM
I've also noticed something similar, specifically on Windows XP. It appears to be a memory leak when VDM is installed on that OS. It behaves perfectly well on my Vista machine, but on XP, every time I switch between desktops, memory usage increases. Depending on how many windows are open on each desktop, the problem can be quite dramatic. On my Vista machine, VDM initially uses somewhat less than 10MB of memory, and pretty much stays in that range. On my XP machine, VDM initially uses somewhere around 20MB of memory, but I've seen that number climb as high as 300MB after extended use and multiple switches between desktops.
Oct 23, 2007 at 5:18 PM
I watched it vary from less than 3MB to more than 12MB. I've never seen a program with such a range (400%) of memory use. I'm on Vista with 2GB, so like I said its not a problem. There doesn't seem to be a direct correlation between window being open an RAM usage, although leakage might explain alot. By the way Vist/XP Virtual is the best desktop switcher I've ever used with the exception of the one on the Enlightenment desktop under Linux.

Michael Grant
Oct 23, 2007 at 5:31 PM
P.S I hope it's obvious I'm new to Windows.
Oct 24, 2007 at 9:59 AM
Hi myklgrant,

The issue is not with Virtual Desktop Manager, but with Vista's memory management system. You might want to look up Vista RAM allocation and the information regarding it. It has been covered extensively in many forums.

Hope that clears things up.
Oct 25, 2007 at 5:48 PM
sb_gorthi,
So I am learning. I have to keep reminding myself of the memory management mantra: "Free memory is wasted memory." I'll read more on Vista's memory management system. Thanx for the info.
Oct 30, 2007 at 2:55 AM
After an entire day of using the Virtual Desktop Manager in Windows XP, my memory consumption was 727MB, Peak Mem Usage 729MB, and VM Size 717MB. I would say there is definitely something going on with its memory usage, at least on Windows XP. I noticed during the day it just kept on using more and more memory.

Ideas? Obviously the program is using the memory somewhere, but in my opinion it's a huge problem to know 720MB of 2GB is being used on 1 application.
Oct 30, 2007 at 10:14 AM
I have the same experience with VDM 0.6 on Windows XP SP2, that VDM takes up a lot of RAM (compared to the Vista experience posted here). I have had VDM running a few hours and now it takes up 86MB of RAM, using the switcher doubles the memory consumption. Yesterday I noticed values as high as 300MB.
Oct 30, 2007 at 10:19 AM
Forgot to mention: great app, I love it. This is excactly what I have been waiting for (used to work on *nix). Keep up the good work


andr1976 wrote:
I have the same experience with VDM 0.6 on Windows XP SP2, that VDM takes up a lot of RAM (compared to the Vista experience posted here). I have had VDM running a few hours and now it takes up 86MB of RAM, using the switcher doubles the memory consumption. Yesterday I noticed values as high as 300MB.

Oct 31, 2007 at 9:56 AM

sb_gorthi wrote:
The issue is not with Virtual Desktop Manager, but with Vista's memory management system. You might want to look up Vista RAM allocation and the information regarding it. It has been covered extensively in many forums.
Hope that clears things up.


Hi sb_gorthi,

Well, your reply didn't clear much, could you be more helpful and post more information about this?

I'm actually using VirtualDesktop with Windows XP and after reboot the application is taking about 20MB of RAM, after I make some desktop switching (but just the switching, I'm not moving any windows to other desktops) and so on the usage grows up to 120MB, and stays at the same level, even if there are no windows moved to other virtual desktops.. and this is NOT normal... the process memory usage should get back to its initial level...

The application is great, but unfortunately it's eating too much memory even if completely IDLE.
Coordinator
Nov 1, 2007 at 9:23 PM
Sorry for not getting back to you guys in a timely manner; I've been busy with school. I believe that is my fault, not XP's. You see, I cache thumbnails of windows in XP. I do this on every switch. It is supposed to destroy ones when they are no longer needed and replace old ones with new ones, but it appears that it isn't quite working properly. I'll try to get this fixed soon.
Mar 6, 2008 at 12:12 AM
This happens in Vista as well, I've documented it on the Bug Tracker: http://www.codeplex.com/vdm/WorkItem/View.aspx?WorkItemId=5574
Mar 8, 2008 at 3:41 PM
If this is using the .net memory then it is not a memory leak. When we first started to develop on .net we found the same problem with our programs. After further investigation it turned out to be a feature of .net. It is more efficient to clean up the memory periodically when it needs doing and not at every line of code. As a result even a small and simple program could use anything from 800kb to 800mb of main memory. This way the CLR can reduce the amount of clean up calls that are made to the memory stack. I believe other run time languages do this like Java.
Mar 8, 2008 at 3:41 PM
Edited Mar 8, 2008 at 4:19 PM
If this is using the .net memory then it is not a memory leak. When we first started to develop on .net we found the same problem with our programs. After further investigation it turned out to be a feature of .net. It is more efficient to clean up the memory periodically when it needs doing and not at every line of code. As a result even a small and simple program could use anything from 800kb to 800mb of main memory. This way the CLR can reduce the amount of clean up calls that are made to the memory stack. I believe other run time languages do this like Java.

And here is a link to memory garbage collection for all those who are interested: http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29

This site answers alot of questions of .net memory management.
http://www.itwriting.com/dotnetmem.php