Currently the Resident Scanner takes up to 40mb Ram
No, it is not true :-)
Here are the words from Vlk, who is currently offline:
I'd like to comment on the memory consumption of avast 4.
I was pretty surprised how much emphasis you guys put to the ‘Mem Usage’ column in the Task Manager. I’m not saying it’s totally pointless to look at this columnn, but the truth is that it is highly inaccurate, and in special cases it can be totally bogus. For more information, I recommend a good book on the topic, like ‘Inside Windows 2000’ from David Solomon and Mark Russinovich.
If you’d like to know how much virtual memory an app is taking, it’s much more sensible to use the ‘VM Size’ column (it’s not shown by default, but you can enable it in the View menu).
If you sum up all 4 avast resident processes’ VM Size values, you get something like 12MB - not little, but imho definitely not a memory hog (not 39MB!!!).
See
? Let’s continue:
There are two values. Actually, their names are very misleading - in fact these two guys correspond to the 'Private Bytes' (the VM Size) and 'Working Set' (the Mem Usage) NT performance counters.
This is what MS says about these values:
Private Bytes (Task Manager’s “VM Size”):
“Private Bytes is the current size, in bytes, of memory that this process has allocated that cannot be shared with other processes.”
In other words, this is the memory the program has allocated (therefore, this is quite reasonable value to compare, and it normally does not fluctuate much)
Working set (Task Manager’s “Mem Usage”):
“Working Set is the current size, in bytes, of the Working Set of this process. The Working Set is the set of memory pages touched recently by the threads in the process. If free memory in the computer is above a threshold, pages are left in the Working Set of a process even if they are not in use. When free memory falls below a threshold, pages are trimmed from Working Sets. If they are needed they will then be soft-faulted back into the Working Set before leaving main memory.”
In my opinion, this value really has a meaning only to the developers. It’s totally useless for the end user as it is trivial to make an application that e.g. allocates a single page (e.g. 4K) and still has a working set of, let’s say 400MB - just by mapping this single page 100,000 times, which is perfectly legal (and in fact, this is, roughly said, what avast 4 is really doing - not 100,000 times, but let’s say, 10 times, but that’s a detail - the point is that this has nothing to do with real ‘memory consumption’, just ‘address space consumption’)…
There are programmatic ways how to artificially lower the Working Set value, and there are programs that use these techniques, but we find it stupid to use them just to make users think that our application is taking less memory than it’s actually taking, not to mention the fact that tampering with the working set can have severe performance consequences…
Hope this will help to explain things a little bit!
Pavel