Skip to main content

Disable JIT/GC

5 replies [Last post]
Joined: 2009-04-08


Is there any way to disable the JIT/GC mechanisms in phoneME?

I was thinking about VM arguments, like in JVM, but I cannot find a list of phoneME supported VM arguments anywere.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2009-04-08

Sorry for double posting

Message was edited by: zaitz3v

Joined: 2006-11-09

You can build VM without JIT: use make option ENABLE_COMPILER=false. Or you can disable compiler in VM with built-in JIT using runtime option -int. First way is preferrable: you save on compiler infrastructure.

There is absolutely no way to disable GC. Garbage collection is the only way to dispose unused objects in Java.

Joined: 2009-04-08

Thanks for your response

I tryied "./runMidlet -int ..." and the timing difference did not suggest that it is not using JIT.

As for GC, I used a JVM a long time ago in which we could disable GC completely. Once the program runs out of heap, it crashes with exceptions. It is useful for measuring the GC overhead.

Joined: 2007-01-03

Not sure if they are all the same for each platform/configuration, but these are the ones for WinCE:

Usage: runMidlet [] [-debug] [-loop] [-classpathext
( | )
[ [ [ []]]]

Run a MIDlet of an installed suite. If the classname
of the MIDlet is not provided and the suite has multiple MIDlets,
the first MIDlet from the suite will be run.

-debug: start the VM suspended in debug mode
-loop: run the MIDlet in a loop until system shuts down
: append
to classpath passed to VM
(can access classes from
as if they were romized)

where is the number of a suite as displayed by the
listMidlets command, and is the unique ID a suite is
referenced by


Joined: 2009-04-08

Thanks for your response

I have downloaded the "MR2 binary bundle (b23) - Linux/x86"

I don't think it is using any VM_ARG. For instance, I passed an "-Xmx32m" and I got:

$ ./linux_x86_fb_chameleon_mvm/bin/runMidlet -Dnumber=100000 -classpathext ../dist/javame.jar sieve.jad PrimeSieve
QVFB info: 240x320, depth=16
The number of primes <= 100000 is 9592

$./linux_x86_fb_chameleon_mvm/bin/runMidlet -Xmx80m -Dnumber=100000 -classpathext ../dist/javame.jar sieve.jad PrimeSieve
QVFB info: 240x320, depth=16
java.lang.ClassNotFoundException: -Dnumber=100000
- java.lang.Class.forName(), bci=0
- .unknown..newInstance(), bci=1
- com.sun.midp.midlet.MIDletStateHandler..unknown.(), bci=63
- com.sun.midp.midlet.MIDletStateHandler..unknown.(), bci=17
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=24
- .unknown...unknown.(), bci=9
- .unknown...unknown.(), bci=5
- .unknown...unknown.(), bci=159
- com.sun.midp.main.MIDletSuiteLoader.main(), bci=9

Message was edited by: zaitz3v