It's not just a programming environment, either; a web browser is an interpreter for some of the most poorly-written, highest-level code in existence. Not very conducive to good memory usage even theoretically.
Re:This is why memory fragmentation is bad
by mixmastamyk on Tuesday July 05, 2011 @03:04AM
(#2728941)
Perhaps, but wouldn't you agree it should get freed when you close the tabs?
Re:This is why memory fragmentation is bad
by nnethercote on Tuesday July 05, 2011 @03:37AM
(#2729004)
Yes, although it might not happen immediately. That's exactly what this fix helps with. And see https://bugzilla.mozilla.org/show_bug.cgi?id=668809 for more about this.
But then the Ctrl+Shift+T feature to reopen closed tabs wouldn't work so well. Try it, you can reopen closed tabs as far back as you like; it's pretty awesome and has saved me more than once.
It doesn't work in Private Mode (for good reason); I wonder if browsing in private mode consumes less memory?
Re:This is why memory fragmentation is bad
by mixmastamyk on Tuesday July 05, 2011 @06:09PM
(#2731807)
I like that feature and use it. But it can be separated from the memory caching. Back button speed is nice too, but I could do without it.
There are a few options here ... keep the last one in memory, the last few in the disk cache, etc. Right now it appears to keep everything you've ever visited in RAM, which is clearly wrong.
That's not to say Firefox's memory usage is perfect, far from it. That's why we're making improvements like this one. See https://wiki.mozilla.org/Performance/MemShrink for more.