Prompting developers to drop portions of code to be able to compile the latest Firefox 11

Dec 12, 2011 18:51 GMT  ·  By

Mozilla, or rather the Firefox team, is facing a somewhat unusual problem that is holding up development in some cases. Firefox can't reliably be compiled because the linker runs out of virtual address space.

The problem stems from the fact that Firefox is built on 32-bit machines which can only access a limited amount of memory even with larger amounts of physical memory.

"This is not the first time we've run into this problem. A couple years ago we hit the 2 GB virtual address space limit. The build machines were changed to use /3GB and that additional GB of address space bought us some time. This time unfortunately the options aren't as easy as flipping a switch," Mozilla's Kyle Huey wrote.

The problem arises during the optimization phase as the Profile-Guided Optimisation method Mozilla uses takes up a lot of memory. Some have proposed that the team stop doing PGO since the performance benefits are not always clear, but the general view is that this is not really an option.

Rather, Mozilla is thinking about splitting up parts of libxul, where much of the core code is grouped. WebGL and ANGLE, which enables WebGL to run on top of Direct3D, code may be a good candidate for splitting, but there are other components as well. Media libraries may be separated as well.

For now though, some newer components and features have been removed, things like Graphite, SPDY, libreg, mostly new additions in Firefox 11.

In the slightly longer term another proposed solution would be to upgrade to using Microsoft Visual C++ 2010. The linker in MSVC 2010 could be more efficient and use up less memory.

Finally, a sort of last resort solution would be to build 32-bit Firefox binaries on 64-bit machines, which can access 4 GB of address space.