On-the-Fly Metadata Stripping for Embedded Java Operating Systems
Considering the typical amount of memory available on a smart card, it is essential to minimize the size of the runtime environment to leave as much memory as possible to applications. This paper shows that on-the-fly constant pool packing can result in a significant reduction of the memory footprint of an embedded Java runtime environment. We first present Jits, an architecture dedicated to building fully-customized Java runtime environments for smart cards. We then detail the optimizations we have implemented in the class loading mechanism of Jits to reduce the size of the loaded class constant pool. By suppressing constant pool entries as they become unnecessary during the class loading process, we manage to compact constant pools of loaded classes to less than 8% of their initial size. We then present the results of our mechanism in term of constant pool and class size reductions, and conclude by suggesting some more aggressive optimizations.
KeywordsJava class loading constant pool packing embedded virtual machine
- [Bizzotto and Grimaud, 2002]Bizzotto, G. and Grimaud, G. (2002). Practical Java Card Bytecode Compression. In Proceedings of RENPAR14 / ASF / SYMPA.Google Scholar
- [Chen, 2000]Chen, Z. (2000). Java Card Technology for Smart Cards: Architecture and Programmer’s Guide. Addison Wesley.Google Scholar
- [Deville et al., 2003]Deville, D., Galland, A., Grimaud, G., and Jean, S. (2003). Smart Card operating systems: Past, Present and Future. In The 5th NORDU/USENIX Conference.Google Scholar
- [Lindholm and Yellin, 1999]Lindholm, T. and Yellin, F. (1999). The Java Virtual Machine Specification, Second Edition. Addison Wesley.Google Scholar
- [Rippert and Hagimont, 2001]Rippert, C. and Hagimont, D. (2001). An evaluation of the Java Card environment. In Proceedings of the Advanced Topic Workshop “Middleware for Mobile Computing”.Google Scholar
- [Schwabe and Susser, 2003]Schwabe, J. E. and Susser, J. B. (2003). Token-Based Linking. US Patent Application number US 2003/0028686 A1. http://www.uspto.gov/.
- [Sun Microsystems, 2000]Sun Microsystems (2000). J2ME Building Blocks for Mobile Devices. http://java.sun.com/products/kvm/wp/KVMwp.pdf.
- [Sun Microsystems, 2002]Sun Microsystems (2002). The CLDC Hotspot Implementation Virtual Machine. http://java.sun.com/products/cldc/wp/CLDC_HI_WhitePaper.pdf.
- [The J-Consortium, 2002]The J-Consortium (2002). JEFF Draft Specification http://www.j-consortium.org/jeffwg/index.shtml.