_Jv_SetMaximumHeapSize

Erik Poupaert erik.poupaert@freestyler-toolkit.org
Sun Sep 21 16:44:00 GMT 2003


> > $ gcj Hello.java --main=Hello -mx 128
>> Thats IMHO the totally wrong place. The maximium heap the executable 
> uses during execution has nothing to do with compiling the program.
>> If this argument should be usable then it should be added when running 
> the executable like this:
>> ./hello -mx 128
>
Your approach would be way more flexible/logical. But then again, what do we do with
the objection made by Andrew? I would endorse it as well:
" Also, we'd be imposing our idea of what args were permissible in a Java program"
In my opinion, the first option would not be "totally" wrong either (just a bit, I
would say). I mean, you know the "hello" program, you know what it is going to be
used for, and therefore know what would be a reasonable limit. Therefore, it could be
acceptable to set it at compile time (or certainly at configure time prior to
compiling). It definitely requires an open-source context, but I think we can safely
assume that anyway.
What we have today, is no support -- or so to speak -- for invoking
_Jv_SetMaximumHeapSize() when starting a native executable; except for the option in
which you bypass jvgenmain and supply your own main() function; but that's rather a
workaround than real support.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /