facebook

how does memory work?

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #311859 Reply

    JamesRaynor
    Member

    hi
    with the problem a recently had with outOfMemoryError or something like, i was wandering how does memory work.

    the problem i had was that i was trying to sort a file in a crazy configuration with pojos, hashmaps, hashsets and a tree. and after that write in a file.

    my guess is that the error i had was due to putting the entire file (with 15000+ rows) in memory to sort them through the hashmap i had.

    my question is:
    how did i fill out more than 64mb of memory if the file is only 25mb?

    and

    now i am trying to use two files and i changed my myeclipse.ini to:

    -vmargs
    -Xmx512m
    -XX:MaxPermSize=256m
    -XX:ReservedCodeCacheSize=256m

    and get the same error outOfMemory exception, how did i fill the entire memory if the 2 files are only 35mb combined?

    and finally what is the best configuration to set my memory?

    #311860 Reply

    JamesRaynor
    Member

    oops!!!!!
    i forgot i have 1.75 gb ram

    #311907 Reply

    Brian Fernandes
    Moderator

    James,

    What sort of application is this, is this a standalone Java app or is this a web application?
    In the case of the former, you have to edit the memory settings in the launch configuration, in the latter, you have to edit the memory settings used to start the server.

    Your application does not run inside the ME memory space, so changing the ME values will not fix your problem. Let us know if you need further assistance.

    #311920 Reply

    JamesRaynor
    Member

    its a stand alone java app, where do i change the launch configuration memory?

    #311921 Reply

    Brian Fernandes
    Moderator

    See this document:
    http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.jdt.doc.user/tasks/tasks-java-local-configuration.htm

    In step 2, instead of creating a new configuration, you should already see the configuration that corresponds to your application in the tree. Select it, go to the Arguments tab, and put the memory settings in the “VM arguments” edit box.

    Hope this helps.

    #311946 Reply

    JamesRaynor
    Member

    i have a problem.

    i dont know how to set the the memory T_T

    i checked the documentation, and looked for a way to set the heap with the “search” and ended up in the same page.
    and i checked the arguments list to see which one refers to memory, but most of them are for location, name or path of a file or resource.

    then i found something on how to set memory i tried :
    -vmargs
    -Xmx512m
    -XX:MaxPermSize=512m
    -XX:ReservedCodeCacheSize=384m

    but got

    Unrecognized option: -vmargs

    how do i write right?

    #311960 Reply

    JamesRaynor,
    You need not specify -vmargs, the rest of the arguments are to be given in a single line.
    I have attached a screen shot for your reference. Let me know if that helps

    Attachments:
    You must be logged in to view attached files.
    #312023 Reply

    JamesRaynor
    Member

    thanx
    i havent had any problems now.

    #312037 Reply

    JamesRaynor,
    Good to know it is working now.
    Do let us know if you have any issues.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: how does memory work?

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in