<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1522" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=538330221-14112005>Hi all,
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538330221-14112005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=538330221-14112005>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). </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=538330221-14112005>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)?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=538330221-14112005>Is it possible to
use kaffe with embedded devices with less than 8 Megs or should I use CDC or
CLDC?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538330221-14112005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=538330221-14112005> public static
void main(String[] args) {<BR> int i = 0;<BR> while (true)
{<BR> System.out.println("i = " +
i++);<BR> try
{<BR> Thread.sleep(100);<BR> } catch
(InterruptedException e) {<BR> // TODO Auto-generated
catch
block<BR> e.printStackTrace();<BR> }<BR> System.gc();
// Just for the test.<BR> }<BR> }<BR></SPAN></FONT><FONT
face=Arial size=2><SPAN class=538330221-14112005></DIV></SPAN></FONT>
<DIV><FONT face=Arial size=2><SPAN class=538330221-14112005><GC: heap 5124K,
total before 2671K, after 2670K (28481/28458 objs)<BR> 47.9% free,
allocated 2K (#26), marked 779K, swept 1K (#23)<BR> 23 objs (1K) awaiting
finalization><BR></DIV></SPAN></FONT>
<DIV><FONT face=Arial size=2><SPAN class=538330221-14112005></SPAN></FONT><FONT
face=Arial size=2><SPAN class=538330221-14112005></SPAN></FONT><FONT face=Arial
size=2><SPAN class=538330221-14112005><FONT face=Courier> PID
USER PR NI VIRT RES SHR S
%CPU %MEM TIME+ DATA COMMAND<BR> 3474
regent 15 0 16460 6240 10m S 4.7
0.2 0:01.79 15m kaffe-bin</FONT></SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN
class=538330221-14112005> </DIV></SPAN></FONT></BODY></HTML>