Re: How can I reduce the size of the jvm?

"Gregory B. Prokopsky" <[email protected]> Sun, 5 Feb 2006 15:03:49 -0500
Newsgroups gmane.comp.java.vm.sablevm.general
Organization SableVM Project http://sablevm.org
Message-ID <20060205200349.GJ5926@gadek>
+++ Eduardo Ruiz [01/02/06 20:03 +0100]:
> I'm making a project about java virtual machines and
> embedded systems, and I have chosen to work with
> sableVM-1.13. But this jvm is too big, so I want to
> decrease its size. Could you tell me if there is a way
> to do it?
> Thanks a lot.

Hi Eduardo,

First you want to strip all binaries, like sablevm, libsablevm and native
libraries of the java class library.

To decrase RAM memory usage at runtime make sure you use direct engine
(--with-threading=direct).

Because most of the total size of JVM + Class Library is the size of Class
Library, you might want to remove some parts of it, for example if you do not
use swing or awt.  Unfortunatelly there's no automated way to do it.

We also had a special "small memory footprint" version of SableVM that is
available from subversion repository with command:

	svn co svn://svn.sablevm.org/developers/patrick/sandbox/svm-sfp/

This is an interesting patch, but some of the changes might make maintanance
and error weeding harder, so it has not been merged in yet.

At first, I suggest you go with stripping native libs and manually removing
parts of the class library you don't use for your app.  This is where most of
the size gains is anyway.

Hope this helps,

		Gregory

-- 
Gregory B. Prokopsky       <[email protected]>
Debian GNU/Linux           http://www.debian.org
SableVM - LGPL'ed Java VM  http://sablevm.org
Why SableVM ?!?            http://sablevm.org/wiki/Features