Article View: borland.public.jbuilder.java.language
Article #18535Can't set stack size in JBuilder JVM when using JIT compiler
From: Adam Dingle
Date: Mon, 08 Jun 1998 00:00
Date: Mon, 08 Jun 1998 00:00
52 lines
2330 bytes
2330 bytes
Hi-
I'm using JBuilder and the JVM which comes with it (which seems to be the JVM
from Sun's JDK 1.1.2, or a modified version thereof). For most JVM's, I can
set the native stack size and Java stack size using the -ss and -oss options
to java.exe on the command line. Unfortunately, the -oss option (and,
presumably, the -ss option as well) has no effect when using the JIT compiler
with the JBuilder JVM. To see this, run the following stack test program I
wrote:
public class StackTest
{
protected static void recurse(int x)
{
if (x % 100 == 0)
System.out.println("recurse: " + x);
recurse(x + 1);
System.out.println("end recurse: " + x); // not reached
}
public static void main(String[] args)
{
recurse(0);
}
}
When the JIT compiler is off (i.e. the java_compiler environment variable is
not set), the number of recursions before a stack overflow depends on the
value I pass in for -oss; for example, java -oss128k StackTest overflows
after about 2800 iterations, but java -oss256k StackTest overflows after
5700. But if java_compiler=javacomp (which turns on the JIT compiler), then
the number of recursions before overflow is constant, no matter what value I
pass for oss.
This is important to me because I have a program which uses a lot of threads
and eats a lot of memory, and I could greatly reduce memory consumption if I
could specify the stack size for each thread. So is there actually any way to
specify a stack size when using the JIT compiler? Would it help to move to
JBuilder 2?
Thanks for any advice or help.
-adam
======
Adam Dingle
Agent Audio
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
Technical Details
Message-ID:
<6lhivn$uj4$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,9bb1854d71e59e17,start X-Google-Attributes: gidf74b3,public From: adam@agentaudio.com (Adam Dingle) Subject: Can't set stack size in JBuilder JVM when using JIT compiler Date: 1998/06/08 Message-ID: <6lhivn$uj4$1@nnrp1.dejanews.com> X-Deja-AN: 360753238 To: shb@agentaudio.com X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT) Organization: Agent Audio X-Article-Creation-Date: Mon Jun 08 20:53:10 1998 GMT Newsgroups: borland.public.jbuilder.java.language