Fix Firefox Heap Constipation!

Firefox is a wonderful web browser, and is innovative in many ways. However ... it has heap memory constipation. That is a snide way of saying is has a broken heap design - memory goes in, but doesn't come out. Why this doesn't get fixed, and instead new features like spell checkers get added, is hard to understand. Perhaps spell checkers impress Jodie Foster.

Firefox starts out lean, and grabs memory from the system for its heap to store incoming information, render images, make bookmark files, etc. However, because of primitive design, it keeps all the memory up to the last morsel used. So you can delete all your old pages, but if the most recent page information is stored at the end of the heap, the heap cannot shrink (though it can be used for other stuff). Firefox does not give the memory back until Firefox terminates. In combination with memory leaks (perhaps from Flash Player Version 9), it can keep consuming memory until it uses it all up and crashes the machine.

Robert Bradbury was kind enough to provide some additional information on the wiki.

Until the Firefox team learns how to return memory, you will need to monitor Firefox memory usage, and kill Firefox and restart it whenever it gets out of hand. Be especially careful about pages with banner ads using flash animation; the images collect in the bowels of Firefox, and like impacted fecal matter, can eventually kill the browser and the operating system hosting it. Don't leave one of these flash-ad pages up overnight. Close unused tabs and windows; each one increases the amount of memory Firefox grabs.

IE and Opera and other browsers may have the same problem. But most of us learned as small children, just because the neighbor kids are allowed play in traffic, that is no excuse for us to do so.

Developers! Fix Firefox Heap Constipation, Please!

last revision June 26, 2007