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


> The arg parsing is much more complex than that -- surely -mx can go
> anywhere.  Also, we'd be imposing our idea of what args were
> permissible in a Java program,

I was moving in the direction of seeing the option in the gcj commandline:

$ gcj Hello.java --main=Hello -mx 128

Or something like this.

> What's wrong with setting the max heap size in a C++ main() function
> and then starting your program with the invocation interface?

jvgenmain generates this main() function. It otherwise works very much ok as far as
I'm concerned. It also removes an -- otherwise additional -- hoop before getting a
functional java executable.

> That way you can do anything you want before starting Java.

There's really not that many things that I would want to do before starting Java (on
the contrary, I'd favour reducing the number of things done when starting Java). The
only reason why I raised the issue with"-mx" is because of the warnings preceding
the _Jv_SetMaximumHeapSize() implementation in prims.cc:

// Set the maximum heap size.  This might be ignored by the GC layer.
// This must be called before _Jv_RunMain.
...


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