[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiler runs out of memory
Hi, see below ...
David Crescent wrote:
>
> I'm using a Windows 2000 machine with 512 Megs of memory, over 330 of
> which are free, and I keep getting java.lang.OutOfMemoryError when I try
> to run the simplec compiler generated by SableCC. I know this is a memory
> intensive application, but surely 330 Megabytes is enough to construct an
> AST from a very small simplec program. I also tried the postfix example,
> and although that compiler doesn't run out of memory, the usage is over
> half of what's available. I have the feeling something is wrong since the
> statement being compiled is 2+3! Any suggestions as to what is wrong would
> be very helpful.
>
> Thanks,
> Dave
Please check the manual of the java program.
Or start java without any options, or with the -X option.
Then you get a short help summary.
Java does not use all your memory as long as you do not tell it to do
so.
There is a -X option to set the minimum memory to aquire during start up
and the maximum memory allowed to aquire during running.
Setting that to a high enough value should work.
On my system(jdk1.4) its :
-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size
Regards,
Angelo
----------------------------------------------------------------------
Angelo Schneider OOAD/UML Angelo.Schneider@oomentor.de
Putlitzstr. 24 Patterns/FrameWorks Fon: +49 721 9812465
76137 Karlsruhe C++/JAVA Fax: +49 721 9812467