[kaffe] Kaffe VM Memory Footprint Optimization
L'Archeveque, Regent
Regent.LArcheveque at space.gc.ca
Mon Nov 14 13:37:53 PST 2005
Hi all,
I try to reduce the memory footprint of the Kaffe VM. Based on old mailing list messages, It seems that targeting 1 Meg RAM device was possible with Java. I have made a lot of tests in order to reduce the footprint as much as possible. I applied the tips mentionned in the kaffe.embedded FAQ but with a minimal impact. A simple program (see below the code and the GC verbose messages and top snapshot) requires more memory than what I expected (based on my readings).
Does someone have some tips or references? Where can I find the list of FEATURE handled by kaffe (FEATURE to be disabled or enabled with configure command)?
Is it possible to use kaffe with embedded devices with less than 8 Megs or should I use CDC or CLDC?
public static void main(String[] args) {
int i = 0;
while (true) {
System.out.println("i = " + i++);
try {
Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.gc(); // Just for the test.
}
}
<GC: heap 5124K, total before 2671K, after 2670K (28481/28458 objs)
47.9% free, allocated 2K (#26), marked 779K, swept 1K (#23)
23 objs (1K) awaiting finalization>
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ DATA COMMAND
3474 regent 15 0 16460 6240 10m S 4.7 0.2 0:01.79 15m kaffe-bin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://kaffe.org/pipermail/kaffe/attachments/20051114/ee1fee1f/attachment-0005.htm
More information about the kaffe
mailing list