Sharing the runtime representation of classes across class loaders

  • Authors:
  • Laurent Daynès;Grzegorz Czajkowski

  • Affiliations:
  • Sun Microsystems Laboratories;Sun Microsystems Laboratories

  • Venue:
  • ECOOP'05 Proceedings of the 19th European conference on Object-Oriented Programming
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

One of the most distinctive features of the JavaTM programming language is the ability to specify class loading policies. Despite the popularity of class loaders, little has been done to reduce the cost associated with defining the same class by multiple loaders. In particular, implementations of the Java virtual machine (JVMTM) create a complete runtime representation of each class regardless of how many class loaders already define the same class. This lack of sharing leads to poor memory utilization and to replicated run-time work. Recent efforts achieve some degree of sharing only when dynamic binding behaves predictably across loaders. This limits sharing to class loaders whose behavior is fully controlled by the JVM. As a result applications that implement their own class loading policies cannot enjoy the benefit of sharing. We present a novel technique for sharing the runtime representation of classes (including bytecodes and, under some conditions, compiled code) across arbitrary user-defined class loaders. We describe how our approach is applied to the multi-tasking virtual machine (MVM). The new multi-tasking virtual machine retains the fast start-up time of the original MVM while extending the scope of footprint savings to applications that exploit user-defined class loaders.