We allocate 1MB chunks from the OS and once they are completely empty, we can return them to the OS. Our problem was that we allocate all sort of objects in these chunks and we didn’t use obvious life-time information during allocation. A short profiling showed that after random surfing we end up in a situation where 30% of our 1MB chunks are only alive because on arena or 4KB are used. That’s terrible!
Closing all tabs after surfing:
- 108,003,328 B — js-gc-heap (without patch)
- 20,971,520 B — js-gc-heap (with patch)
Memory footprint of the whole browser:
- 310,890,496 B — resident (without patch)
- 219,856,896 B — resident (with patch)
WOW a major improvement for all Firefox users that is already in the nightly and aurora builds. It will be shipped with the Firefox 7 release for everybody!