Changing JVM heap size

Discussion in 'Java' started by Oleg Konovalov, Jul 9, 2004.

  1. 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.
    Oleg Konovalov, Jul 9, 2004
    #1
    1. Advertising

  2. "Oleg Konovalov" <> 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.
    Tor Iver Wilhelmsen, Jul 10, 2004
    #2
    1. Advertising

  3. Oleg Konovalov

    Dave Guest

    In article <ccn5b0$>,
    "Oleg Konovalov" <> 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?thread=523105&forum=37&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
    Dave, Aug 1, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. iris
    Replies:
    1
    Views:
    23,983
    Robert Olofsson
    Oct 30, 2003
  2. Harpstein

    Settings default JVM heap size

    Harpstein, Dec 11, 2003, in forum: Java
    Replies:
    2
    Views:
    24,611
    Harpstein
    Dec 12, 2003
  3. Michal Slocinski

    Heap dump file size vs heap size

    Michal Slocinski, Mar 25, 2008, in forum: Java
    Replies:
    1
    Views:
    731
    GArlington
    Mar 25, 2008
  4. viki
    Replies:
    6
    Views:
    559
    Erik Wikström
    Jun 28, 2008
  5. Raymond Schanks
    Replies:
    0
    Views:
    516
    Raymond Schanks
    Apr 11, 2010
Loading...

Share This Page