0

To keep things simple I have a spreadsheet that lists x and y values. I'm not sure how many of these data points there are but 13.5 million is a safe lower bound. Anyway, I wrote a program to parse this file and plot the points in jfreechart and the program ran out of memory.

I tried messing with the heap size, I have 4GB of RAM so I tried passing -Xms1024m -Xms2048m to java and was told it couldn't allocate that much space, I then halved those values and the program ran, didn't run out of memory, but the chart kind of just showed it's window border and I got that weird effect were the chart moved but didn't erase it's old position when I moved it(basically the program broke).

I could do all this fine in C so I'm wondering if I should just go back to it. Another thing is that I'd like to let less computer savvy people use this program and I doubt that they would want to mess with Heap Sizes, or use the command line. So can I adjust the heap from within the program(set the heap at the start of the main method or let the user set the heap through a dialog box)?

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by __avd
1

You may increase to 4GB on a 32 bit system. If you are on a 64 bit system you can go higher.

use the cmd-line flags.

>java -Xmx6144M -d64

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.