Compartmental memory management in a modern web browser

  • Authors:
  • Gregor Wagner;Andreas Gal;Christian Wimmer;Brendan Eich;Michael Franz

  • Affiliations:
  • University of California, Irvine, Irvine, CA, USA;Mozilla Corporation, Mountain View, CA, USA;University of California, Irvine, Irvine, CA, USA;Mozilla Corporation, Mountain View, CA, USA;University of California, Irvine, Irvine, CA, USA

  • Venue:
  • Proceedings of the international symposium on Memory management
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Since their inception, the usage pattern of web browsers has changed substantially. Rather than sequentially navigating static web sites, modern web browsers often manage a large number of simultaneous tabs displaying dynamic web content, each of which might be running a substantial amount of client-side JavaScript code. This environment introduced a new degree of parallelism that was not fully embraced by the underlying JavaScript virtual machine architecture. We propose a novel abstraction for multiple disjoint JavaScript heaps, which we call compartments. We use the notion of document origin to cluster objects into separate compartments. Objects within a compartment can reference each other directly. Objects across compartments can only reference each other through wrappers. Our approach reduces garbage collection pause times by permitting collection of sub-heaps (compartments), and we can use cross-compartment wrappers to enforce cross origin object access policy.