Christian Wimmer

Compartmental Memory Management in a Modern Web Browser

Gregor Wagner, Andreas Gal, Christian Wimmer, Brendan Eich, Michael Franz: Compartmental Memory Management in a Modern Web Browser. In Proceedings of the International Symposium on Memory Management, pages 119–128. ACM Press, 2011. doi:10.1145/1993478.1993496

Download as PDF
© ACM, 2011.

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.