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.
- S. M. Blackburn, R. Jones, K. S. McKinley, and J. E. B. Moss. Beltway: getting around garbage collection gridlock. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 153--164. ACM Press, 2002. 10.1145/512529.512548. Google Scholar
Digital Library
- R. S. Cox, S. D. Gribble, H. M. Levy, and J. G. Hansen. A safety-oriented platform for web applications. In Proceedings of the IEEE Symposium on Security and Privacy, pages 350--364. IEEE Computer Society, 2006. 10.1109/SP.2006.4. Google Scholar
Digital Library
- A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. R. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, J. Ruderman, E. W. Smith, R. Reitmaier, M. Bebenita, M. Chang, and M. Franz. Trace-based just-in-time type specialization for dynamic languages. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 465--478. ACM Press, 2009. 10.1145/1542476.1542528. Google Scholar
Digital Library
- C. Grier, S. Tang, and S. T. King. Secure web browsing with the OP web browser. In Proceedings of the IEEE Symposium on Security and Privacy, pages 402--416. IEEE Computer Society, 2008. 10.1109/SP.2008.19. Google Scholar
Digital Library
- D. R. Hanson. Fast allocation and deallocation of memory based on object lifetimes. Software - Practice and Experience, 20 (1): 5--12, 1990. 10.1002/spe.4380200104. Google Scholar
Digital Library
- M. Hirzel. Connectivity-Based Garbage Collection. PhD thesis, Department of Computer Science, University of Colorado at Boulder, 2004. Google Scholar
Digital Library
- M. Hirzel, J. Henkel, A. Diwan, and M. Hind. Understanding the connectivity of heap objects. In Proceedings of the International Symposium on Memory Management, pages 36--49. ACM Press, 2002. 10.1145/512429.512435. Google Scholar
Digital Library
- H. Inoue, H. Komatsu, and T. Nakatani. A study of memory management for web-based applications on multicore processors. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 386--396. ACM Press, 2009. 10.1145/1542476.1542520. Google Scholar
Digital Library
- Intel. Using the RDTSC instruction for performance monitoring, 1997.Google Scholar
- R. Jones and R. Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley & Sons, Inc., 1996. Google Scholar
Digital Library
- E. Jul, H. Levy, N. Hutchinson, and A. Black. Fine-grained mobility in the Emerald system. ACM Transactions on Computer Systems, 6 (1): 109--133, 1988. 10.1145/35037.42182. Google Scholar
Digital Library
- N. C. Juul and E. Jul. Comprehensive and robust garbage collection in a distributed system. In Proceedings of the International Workshop on Memory Management, pages 103--115. LNCS Volume 637, Springer-Verlag, 1992. 10.1007/BFb0017185. Google Scholar
Digital Library
- D. E. Knuth. Fundamental Algorithms, The Art of Computer Programming, chapter 2, volume 1. Addison Wesley, 2nd edition, 1973.Google Scholar
- S. McFarling. Program optimization for instruction caches. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems, pages 183--191. ACM Press, 1989. 10.1145/70082.68200. Google Scholar
Digital Library
- Microsoft. What's new in Internet Explorer 8, 2008. URL http://msdn.microsoft.com/en-us/library/cc288472.aspx.Google Scholar
- Mozilla. Firefox web browser and Thunderbird email client, 2011 URL http://www.mozilla.com.Google Scholar
- Mozilla. Kraken JavaScript benchmark, 2011. URL http://krakenbenchmark.mozilla.org/.Google Scholar
- Mozilla. SpiderMonkey (JavaScript-C) engine, 2011. URL http://www.mozilla.org/js/spidermonkey/.Google Scholar
- J. Peachey, R. Bunt, and C. Colbourn. Some empirical observations on program behavior with applications to program restructuring. IEEE Transactions on Software Engineering, 11 (2): 188--193, 1985. 10.1109/TSE.1985.232193. Google Scholar
Digital Library
- C. Reis and S. D. Gribble. Isolating web programs in modern browser architectures. In Proceedings of the European Conference on Computer Systems, pages 219--232. ACM Press, 2009. 10.1145/1519065.1519090. Google Scholar
Digital Library
- G. Richards, S. Lebresne, B. Burg, and J. Vitek. An analysis of the dynamic behavior of JavaScript programs. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 1--12. ACM Press, 2010. 10.1145/1806596.1806598. Google Scholar
Digital Library
- J. Rudermann. The same origin policy, 2001. URL https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript.Google Scholar
- M. L. Seidl and B. G. Zorn. Segregating heap objects by reference behavior and lifetime. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems, pages 12--23. ACM Press, 1998. 10.1145/291069.291012. Google Scholar
Digital Library
- StatCounter. Global Stats, 2011. URL http://gs.statcounter.com/.Google Scholar
- C. J. Stephenson. Fast fits: New methods for dynamic storage allocation. In Proceedings of the ACM Symposium on Operating Systems Principles, pages 30--32. ACM Press, 1983. 10.1145/800217.806613. Google Scholar
Digital Library
- H. J. Wang, C. Grier, E. Moshchuk, S. T. King, P. Choudhury, and H. Venter. The multi-principal OS construction of the Gazelle web browser. In Proceedings of the USENIX Security Symposium, pages 417--432. USENIX, 2009. Google Scholar
Digital Library
Index Terms
Compartmental memory management in a modern web browser
Recommendations
Compartmental memory management in a modern web browser
ISMM '11: Proceedings of the international symposium on Memory managementSince 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 ...
Thinking Inside the Box: Compartmentalized Garbage Collection
The web browser is the “new desktop.” Not only do many users spend most of their time using the browser, the browser has also become host to rich and dynamic applications that were previously tailored to each individual operating system. The lingua ...
Optimal heap limits for reducing browser memory use
Garbage-collected language runtimes carefully tune heap limits to reduce garbage collection time and memory usage. However, there's a trade-off: a lower heap limit reduces memory use but increases garbage collection time. Classic methods for setting ...







Comments