TheOneLLama schreef op 18 augustus 2002 @ 22:39:
[...]
Als je naar de VM usage kijkt zie je dus dat er niets naar de swap verdijnt. Het is dus allemaal alloceren en dealloceren van GUI resources.
Is het veilig om na het vluchtig lezen van deze thread te concluderen dat vooral GUI's (winforms) veel geheugen kost in .NET? Hebben ze vast van Java gejat

Nee, VM Size is het aantal virtuele geheugen dat een applicatie gebruikt. Dat veranderd niet zo snel in de loop van een programma. GUI resources vallen daar niet onder. Ook niet onder Mem Usage trouwens. Het verschil wat je ziet bij de Mem Usage is o.a. een soort cache werking en de gesharde stukken geheugen zoals DLLs en code worden er wel bijgeteld. Er kunnen van de Mem Usage geen enkele conclusies worden getrokken. Hieronder wat webpages daarover.
http://alkaline.vestris.c...-faq/af-tech-memtask.html
Any operating system has a fixed amount of physical memory available. Usually, application need more than the physical memory installed on your system, for that purpose the operating system uses a swap mechanism: instead of storing data in physical memory, it uses a disk file.
On operating systems, such as Windows NT, Windows 2000 or UNIX, the memory is logically divided in pages. When the system needs a certain portion of memory which is currently in the swap (this is called a page fault) it will load all the corresponding pages into RAM. When a page is not accessed for a long time, it is saved back to disk and discarded.
If you look on the Windows NT Task Manager or the output from ps or top, Mem Usage is the working set size. It is the amount of physical memory which is directly (currently) allocated to the process. It can be accessed without causing a page fault. This includes pages shared with other processes. The Windows NT VM Size or the UNIX RSS value is the total private virtual memory allocated to the process.
http://miranda-icq.sourceforge.net/rich/
So if you really do want to measure memory use, what are the options? You could look at physical memory, but that will jump all over the place, and depend on what else is running and what it's doing, how much RAM you have, and is basically completely random. Another option is to measure the difference between total memory used when Miranda is running and when it's not. This is pretty reliable, but it's a pain and you still don't know what the cache is doing. Personally, I use the 'VM Size' column, because it's quick and provides fairly good consistency over multiple runs, but it has the problem that it doesn't indicate how much you're relying on the cache to do your work for you. The summary is basically, what are you trying to achieve?
PS: Again: Voor .Net sta ik niet in'
We adore chaos because we like to restore order - M.C. Escher