Is it true that the more memory your computer has, the more memory some programs use? I’ve read several forums where people mention that they have a gigabyte or more of memory and that Firefox, or Quicken, or some other program is using, say, 900 MB. They call those programs memory hogs and say their computers slow down. My 4 1/2 year old WIN XP computer has 394 MB and when I use those programs (the most current versions), they only use a fraction of that amount of memory. For example, I frequently have 10, 20, or even 30 tabs open in Firefox and it remains in a well-behaved 50-70 MB, maybe up to 90 MB range. When and why do you need 1 GB of ram? Is it mostly for games?

There are lots of reasons one might want a gigabyte of memory, but it shouldn’t be for something as simple as Firefox. I’d have to agree that someone’s a memory hog in that situation, but it might not be Firefox.

Your situation is actually much more common.

A well-written program uses the memory it needs, and no more. It frees memory for use by other programs when it’s no longer needed. That’s an oversimplified definition of program that’s a good citizen.

If a good citizen program uses a lot of memory, there’s a reason, and in most cases, the reason is performance. Games are a good example – if written properly, a game can keep information in memory for faster access than if it had to read that information from disk.

Other programs can often also take advantage of additional memory in the same way. Database programs are a good example. Programs like Quicken could fall into the same category. If you’re working with a large database of Quicken data, it’s conceivable that it could use a lot of memory. A good, but inexact, judge might be the size of the Quicken files themselves.

So a single program could, in some cases, use a lot of memory, legitimately, and on purpose.

But a gigabyte is a lot of memory. Even after you remove the amount of memory used by Windows, there’s a lot left over. To be honest, it’s a rare program that’ll try to use it all.

The more common case of an application using that much memory is what’s called a “memory leak”. Recall that I said a good citizen program “frees memory for use by other programs when it’s no longer needed”. A memory leak is a fairly simple situation where a program loses track of the memory it has used, and neglects to free it for use by others. In other words, a bug in the program. I’m not pointing the finger at Firefox, by the way – though it could have a bug, as far as I know it’s been very well behaved. More likely is one of its add-ons, or even worse, spyware of some sort.

While not totally benign, memory leaks are mitigated by the way Windows manages memory. If a program isn’t actually using all 900Meg, Windows might swap the contents of the memory to disk into the paging file, and free it for use by other applications. That actually just delays the eventual problem of the paging file filling up. And yes, depending on how this application, and others running at the same time, use memory, it could result in performance degradation.

So why would you want a gigabyte, or more, of memory, if your program doesn’t use it? There are a couple of reasons. Windows can use the memory for better handling of it’s own operations, such as reading and writing files to disk. In fact, adding memory to a slow system is one of the best ways to improve Windows’ performance.

More commonly is that Windows is a multi-tasking operating system, and you can run more than one program at a time. I’m quite guilty of this myself. As I write this I have several programs running including my editor, my email program, my browser and a few other things. The more memory, the less impact running programs have on each other’s performance.


Article Useful? [Digg It] [Bookmark It on]

[tags]firefox,spyware,adware,leo notenboom,memory management,memory leak[/tags]