Java stack vs. real stack
pavel_roskin at geocities.com
Mon May 17 06:44:43 PDT 1999
I have investigated why StackOverflowError is thrown in AWT programs when
Kaffe uses the interpreting engine.
Hare are my results.
1) -ss switch doesn't affect stack size of the main thread in Kaffe. It is
always 1M (RedHat-6.0, i686, Linux-2.2.9). However, in JDK 1.1.7v2 -ss
affects all threads.
2) In the simplest case when functions are called without arguments (see
test/regression/Overflow.java) JDK consumes 44 bytes per java call,
Kaffe/JIT consumes 88 bytes, and Kaffe/Interpreter wastes 516 bytes!!!
3) Alone "vmException mjbuf;" at kaffe/kaffevm/intrp/machine.c:77 consumes
172 bytes per java call.
AWT programs in Kaffe/Interpreter with 32k (default!) stack throw
StackOverflowError when Java stack contains approximately 80 calls.
Unfortunately, AWT runs in a separate thread, so this happens almost for
More information about the kaffe