摘要 |
System and method for supporting per-program classpath and class sharing in a multi-tasking virtual machine. A virtual machine may allow each program to specify its classpath independently of other programs classpaths. Tasks that specify identical classpaths for their respective class loaders may share the runtime representation of classes. A multi-tasking virtual machine may generate and compare canonical forms of classpaths to determine which programs may share classes with each other. The runtime representation of a class may be split between shared and private portions of the runtime representation. A shared runtime representation may be associated with multiple private runtime representations. In one embodiment, unique class loader keys and a system dictionary may be used to associate tasks, class loaders and the shared representations of classes.
|