This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: _Jv_SetMaximumHeapSize


> > $ 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]