Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Changing JVM heap size

Reply
Thread Tools

Changing JVM heap size

 
 
Oleg Konovalov
Guest
Posts: n/a
 
      07-09-2004
Hi,

I am running applets in Java Plug-in 1.4.2 under IE6
and often receive OutOfMemory exceptions
(dealing with large file - video clips, etc.)
although according to option M, almost 50% (out of 64MB) of memory is
available.

If I start playing with Java Runtime parameters, like setting it to
mx128m, it actualy decreases the heap size:
Memory: 8,904K Free: 2,630K (29%) ... completed.

Is there a way to increase it to 128 or 256 MB ?

Have 2GB of RAM.

Thank you in advance,
Oleg.



 
Reply With Quote
 
 
 
 
Tor Iver Wilhelmsen
Guest
Posts: n/a
 
      07-10-2004
"Oleg Konovalov" <(E-Mail Removed)> writes:

> If I start playing with Java Runtime parameters, like setting it to
> mx128m, it actualy decreases the heap size:
> Memory: 8,904K Free: 2,630K (29%) ... completed.


The mx parameter value just sets the maximum heap size. If you want
the heap to be 128m all the time, you need to set the minimum heap as
well, e.g. -Xms128m

Just a note, two of the newsgroups you crossposted to no longer
officially exist.
 
Reply With Quote
 
 
 
 
Dave
Guest
Posts: n/a
 
      08-01-2004
In article <ccn5b0$(E-Mail Removed)>,
"Oleg Konovalov" <(E-Mail Removed)> wrote:

> Hi,
>
> I am running applets in Java Plug-in 1.4.2 under IE6
> and often receive OutOfMemory exceptions
> (dealing with large file - video clips, etc.)
> although according to option M, almost 50% (out of 64MB) of memory is
> available.
>
> If I start playing with Java Runtime parameters, like setting it to
> mx128m, it actualy decreases the heap size:
> Memory: 8,904K Free: 2,630K (29%) ... completed.
>
> Is there a way to increase it to 128 or 256 MB ?
>
> Have 2GB of RAM.
>
> Thank you in advance,
> Oleg.


Hey Oleg!

I think you have been looking in the wrong place...

In Windows, the applet heap size is determined by the Java Plug-in. So
you have to adjust it in the Java Plug-in Control Panel.

"On Windows: From the Windows Control Panel, double-click the Java
coffee-cup icon labeled Java Plug-in to launch the Java Plug-in Control
Panel."


shankar.unni says...

"You *can* set (the heap size) for the entire VM that's loaded in the
(web) browser, by using the 'Java Plug-In Control Panel'. Under the
'Advanced' tab, there's a box for 'Java runtime parameters'."

http://forum.java.sun.com/thread.jsp...&message=25046
09


"To increase the heap size to 64 megabytes, run the Java Plug-in Control
Panel application and set the "Java Run Time Parameters" to " -Xmx64m"

http://www.sportsci.com/pzt/java3d/

HTH

--Dave
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How much heap can I reserve for JVM? Error when allocation very much heap Raymond Schanks Java 0 04-11-2010 04:25 PM
stl heap question: restoring heap validinty after changing 1 element viki C++ 6 06-28-2008 10:12 AM
Heap dump file size vs heap size Michal Slocinski Java 1 03-25-2008 12:54 PM
Settings default JVM heap size Harpstein Java 2 12-12-2003 02:31 PM
Checking the heap size of a jvm at run time iris Java 1 10-30-2003 09:01 PM



Advertisments