🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18552

Re: Can't set stack size in JBuilder JVM when using JIT compiler

#18552
From: Gerry Mantha
Date: Tue, 09 Jun 1998 00:00
77 lines
2999 bytes
Adam,

You running Solaris?  Cause if your on Windows the jre or jrew ignores the
JAVA_COMPILER environment variable.  It runs the jit by default.  In order
to turn the jit off, you must use the -nojit command line option.  Course,
if your not on windows you are describing something really wierd indeed.
The -oss (not the -ss necessarily, that's for C code stack) should
definitely make a difference with the jit!  I will try it myself, I'd hate
to think I was being fooled into thinking those heap and stack command
options were actually working!  ;-)


Adam Dingle wrote in message <6lhivn$uj4$1@nnrp1.dejanews.com>...
>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: <6lki9t$7j311@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6lhivn$uj4$1@nnrp1.dejanews.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,9bb1854d71e59e17
X-Google-Attributes: gidf74b3,public
From: "Gerry Mantha" <gmantha@home.com>
Subject: Re: Can't set stack size in JBuilder JVM when using JIT compiler
Date: 1998/06/09
Message-ID: <6lki9t$7j311@forums.borland.com>
X-Deja-AN: 361190353
References: <6lhivn$uj4$1@nnrp1.dejanews.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.1
Organization: QTECH Hybrid Systems Inc.
Newsgroups: borland.public.jbuilder.java.language