Kiev & out-of-memory

Maxim Kizub max at
Mon Dec 7 06:56:33 PST 1998


Sorry for late answer. I had problems with my ISP...

About kiev... As a standard test I use compiling
kiev itself. Kiev is written in kiev ;-) It was bootstrapped
with pizza, but from version 0.01 may be compiled with
kiev only...

Next. There should be small difference between one file and
all file compilation. Kiev is a two-pass compiler, first, it scans
all sources to find out all classes and methods, in second
stage it compiles files separatly. Espesial care was done to
cleanup all info about already compiled files. In practice,
to compile full kiev project the memory usage grows from
8 Mb after scanning to 12-13 Mb to compile all files
(I use a global array to store identifiers in UTF8 format,
so, it can't be collected).

Kaffe (as well, as japhar) uses about 32 mb of memory to
scan files, and throws OutOfMemory exception shortly
after start of second (actual parsing) stage.

I'll update kaffe from CVS and will see new results today.
I also upgraded my computer to have 64 MB and hope,
that it will be enough... I'll send results later...

>> Hello.
>> BTW, I've asked a question here. about two months ago, about memory.
>> Kiev compiler still can't compile under kaffe because of OutOfMemory,
>> but it usually takes less memory then javac...
>> I'd like to reask this question again - how to profile or check out
>> the reason of this enormouse memory usage? Also, since kiev
>> is uder GPL now, is it possible to obtaine help from you? Since,
>> having sources, you have a chance to find it yourselfs, if it's something
>> obvious...
>I just glanced at that thread from Sep.  From reading it, it wasn't clear
>to me whether Kiev ran out of memory when trying to compile something
>or whether pizza, the javac replacement that ships with Kaffe, ran out
>of memory when trying to compile Kiev.  If the latter, does it happen
>when you give all files to pizza at the same time, or does it happen
>even if you tell it to only compile a single file?
>There have been improvements to Kaffe since then, so I'd encourage you
>to try it again.
>In any event, be aware of the -mx and -ms command line switches.
>Also, on some systems make sure you 'unlimit' so that the OS doesn't
>impose some limit kaffe doesn't know about.
> kaffe -ms 8m -mx 64m pizza.compiler.Main kiev/*.java
>and also
> kaffe -verbosegc -ms 8m -mx 64m pizza.compiler.Main kiev/*.java
>(or kaffe -verbosegc -ms 8m -mx 64m kiev.Main *.java, depending on what
>the problem is.) and see what that gives.
> - Godmar

More information about the kaffe mailing list