Results 1 to 9 of 9
  1. #1
    davetheant is offline Member
    Join Date
    Sep 2010
    Posts
    47
    Rep Power
    0

    Default Heap problems in Eclipse?

    Hello everyone. I am getting OOME's in Eclipse when trying to run my code. I added -Xms and -Xmx arguments to my eclipse.ini file (under the vmargs section), and gave them a generous 800mb. When I open Eclipse, I see that the bar showing my heap has a new max of 800mb. When I run my code, however, the 'used' bar never goes past 40mb, but I get the error. I even changed my run settings and put in -Xms and -Xmx args there as well.

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Go to the run configuration and and add those options to the VM arguments text area on the arguments tab.

  3. #3
    davetheant is offline Member
    Join Date
    Sep 2010
    Posts
    47
    Rep Power
    0

    Default

    I did that as well to no avail.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,891
    Rep Power
    25

    Default

    What is your code doing that makes it run out of memory? Do you have a recursive loop?

    Try catching the exception and printing the stack.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    what exactly is your error message? Are you running out of stack memory? Do you have uncontrolled recursion going on?

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,773
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Fubarable View Post
    what exactly is your error message? Are you running out of stack memory? Do you have uncontrolled recursion going on?
    Nope, the OP ran out of heap memory, hence the OOME, otherwise a StackOverflowError would've been thrown; it's some sticky memory that can't be released because the OP's classes still have a reference to the objects.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    You also get OOME's for to many handles and/or too many threads, etc. You do know that, right?
    That was meant for the OP, BTW.
    Last edited by masijade; 06-18-2011 at 06:01 PM.

  8. #8
    davetheant is offline Member
    Join Date
    Sep 2010
    Posts
    47
    Rep Power
    0

    Default

    I think the problem was trying to create an array with too many elements, but I really didn't think two arrays of longs with 10,000 elements each should really make a problem. I found another way to solve the assignment, but I still would like to solve the heap problem. The error was just the regular out of memory: heap

  9. #9
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    That is only 160k. Now a two-dimensional array of 10,000 elements in each "level" is another story.

    That is, of course, 800 Mb, then.
    Last edited by masijade; 06-18-2011 at 07:21 PM.

Similar Threads

  1. eclipse plug-in problems
    By vasug in forum Eclipse
    Replies: 2
    Last Post: 02-01-2010, 09:44 AM
  2. Problems with Eclipse
    By masko in forum New To Java
    Replies: 2
    Last Post: 01-24-2009, 07:58 PM
  3. problems in eclipse 3.3.2
    By KiDHaCK in forum Eclipse
    Replies: 0
    Last Post: 06-17-2008, 05:55 PM
  4. Problems with hibernate and eclipse
    By Albert in forum JDBC
    Replies: 2
    Last Post: 06-05-2008, 04:34 PM
  5. Problems with Eclipse
    By Daniel in forum Eclipse
    Replies: 1
    Last Post: 07-06-2007, 05:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •