Mozilla 2/Memory

From MozillaWiki
Jump to: navigation, search


  • bsmedberg, jasone
  • dmandelin (for rewriting)
  • (stuart, jorendorff)


There are two tracks.

Track 1 - Out of memory (OOM) handling - Underway. This is being managed in Bugzilla. See tracking bug 427099.

Track 2 - Garbage collection based on jemalloc - Design stage.

Overview and Motivations

Track 1:

  • Simplify the Mozilla codebase and avoid untested error paths by assuming that most allocations do not fail.
  • Design and test fallback mechanisms at OOM or close-to-OOM for freeing caches, closing tabs, etc. See Mozilla_2/Memory/OOM_API for the API design.

Track 2:

  • Add garbage collection support to jemalloc to support XPCOMGC.

Risks and Assumptions

Risks are that we actually will hit OOM and abort, mainly on small devices.

Schedule and Milestones

Track 1 - See bug 427099 and its Depends On list. See also OOM handling meeting notes: Mozilla 2/StatusMeetings/2008-02-06

Track 2 - No date estimate yet. Initial discussion of APIs needed for garbage collection is ongoing at GC_API. Note that this is not a blocker for XPCOMGC work, because MMgc works now; it's just likely that our memory usage and perf will be much better with a jemalloc backend.