JamaicaVM -- User Documentation: The Virtual Machine for Real-time and Embedded Systems | ||
---|---|---|
Prev | Chapter 2. Jamaica Builder | Next |
The option '-smart' is reserved for applications that do not use dynamic class loading, which is the case for most embedded applications. Here, the Builder can analyse the application thoroughly and remove any code or date that is not essential for the execution of the application. This results in a significant reduction in code size for most applications. The example code above can be reduced by a factor of nearly 10:
> jamaica -smart HelloWorld Jamaica Builder Tool + HelloWorld.c + HelloWorld.makefile Classfile compaction gain: 53.394516% (267947 ==> 124878) gcc "-O0" -o HelloWorld.o -c HelloWorld.c -DNDEBUG -I /fzi/swt/siebert/JamSun/src//bin/../include/ gcc -o HelloWorld /fzi/swt/siebert/JamSun/src//bin/../obj/32/java_lang_Class.o ... strip HelloWorld > ls -l HelloWorld -rwxrwxr-x 1 user group 129580 Oct 29 14:20 HelloWorld > |
On the PowerPC platform, this results in a total executable file size of less than 130k, which includes about 120k for the Jamaica Virtual Machine itself.