Alzheimer’s No More. Fennec and the New Memory Management

Chuong Nguyen | March 24, 2009 8:51 PM

Fennec, or Mobile Firefox as it has been referred to, escaped into alpha testing with a bit of problem. The issue here is memory allocation. Users found themselves running out of memory quickly–even on modern devices like the Touch Pro with abundant RAM. So what’s really going on under the hood and in the software?

The folks over at the Mozilla blog are hoping to shed some light on the issue. According to Mozilla, the memory leak isn’t because the application ran out real memory, but rather the artificial limit of 32 MB imposed on each process by Windows CE, the core underlying operating system behind Windows Mobile. To further complicate the issue, the checkerboard, which occurred when the device runs out memory, was only witnessed by carrier-branded devices; Mozilla claims that they didn’t experience the same issues in testing with unlocked HTC devices.

Memory Resolution

Mozilla preserved valuable memory in two ways. The first way is to re-code and re-use a single buffer for every screen redraw. According to Mozilla, This didn’t actually decrease the amount of memory we were using, but instead significantly reduced the amount of memory “thrashing,” (repeatedly allocating and freeing chunks of memory).

The second thing that Mozilla did was to use jermalloc, a process already used in the Mozilla desktop browser over a year ago. The same desktop browsing from Firefox is now being ported to Fennec. You can read more about the jermalloc process through Jason Evan’s paper.

It looks like the memory issue has been resolved. It’s an exciting time for Windows Mobile with an assortment of browsers and browsing services to choose from, and Fennec makes for a great addition.

This post has been tagged with:
Related to this post

No related post found.

Switch to our mobile site