OutOfMemoryError

Discussion in 'Java' started by Allan Bruce, Jun 30, 2004.

  1. Allan Bruce

    Allan Bruce Guest

    I am hitting a java.lang.OutofMemoryError exception, but my program only
    seems to be using about 75MB of memory. My machine has 2GB of memory so
    theres something not right.
    Can anybody tell me how to resolve this? In case it matters, I am using
    NetBeans IDE.
    Thanks
    Allan
    Allan Bruce, Jun 30, 2004
    #1
    1. Advertising

  2. The following switches will set the minimum and maximum memory Java can
    utilize: -Xms512m -Xmx512m
    (Only the maximum is required.)

    --Raffa

    "Allan Bruce" <> wrote in message
    news:cbu0pi$k6l$2surf.net...
    > I am hitting a java.lang.OutofMemoryError exception, but my program only
    > seems to be using about 75MB of memory. My machine has 2GB of memory so
    > theres something not right.
    > Can anybody tell me how to resolve this? In case it matters, I am using
    > NetBeans IDE.
    > Thanks
    > Allan
    >
    >
    Raffa Edwards, Jun 30, 2004
    #2
    1. Advertising

  3. Allan Bruce

    Chris Smith Guest

    Raffa Edwards wrote:
    > The following switches will set the minimum and maximum memory Java can
    > utilize: -Xms512m -Xmx512m
    > (Only the maximum is required.)


    To be clear, neither is "required" per se. I suspect you mean only the
    maximum is needed to solve this problem.

    --
    www.designacourse.com
    The Easiest Way to Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
    Chris Smith, Jun 30, 2004
    #3
  4. Chris Smith wrote:
    > Raffa Edwards wrote:
    >
    >>The following switches will set the minimum and maximum memory Java can
    >>utilize: -Xms512m -Xmx512m
    >>(Only the maximum is required.)

    >
    >
    > To be clear, neither is "required" per se. I suspect you mean only the
    > maximum is needed to solve this problem.
    >


    Also, to be clear, these are command line arguments to the java VM. e.g.
    java -Xmx512m MyClass
    java -Xmx512m -jar MyJar.jar

    The default max heap size is 64M, so allowing for the VM and other
    overheads, running out at 70M sounds about right.

    Steve
    Steve Horsley, Jun 30, 2004
    #4
    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. =?Utf-8?B?RGF2ZQ==?=

    Serialize session state & OutOfMemoryError?

    =?Utf-8?B?RGF2ZQ==?=, Sep 8, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,531
    =?Utf-8?B?RGF2ZQ==?=
    Sep 8, 2005
  2. Robert Olofsson
    Replies:
    3
    Views:
    2,981
    Sunitha Kumar
    Jul 3, 2003
  3. Ian Suttle
    Replies:
    2
    Views:
    2,301
    Wolfram Rittmeyer
    Aug 27, 2003
  4. Dean
    Replies:
    1
    Views:
    649
    Robert Olofsson
    Sep 8, 2003
  5. Xiaopeng Xiong

    java.lang.OutOfMemoryError problem

    Xiaopeng Xiong, Nov 14, 2003, in forum: Java
    Replies:
    3
    Views:
    433
    Xiaopeng Xiong
    Nov 15, 2003
Loading...

Share This Page