Link to home
Start Free TrialLog in
Avatar of petepalmer
petepalmer

asked on

Out of memory

Hi all,
           I'm having a bit of trouble with my application. It tries to load a reasonably large result set into memory. Now on my laptop which only has 512MB of RAM - this is quite easy to understand. So,  this nice new computer has 4GB of RAM specifically to handle this problem..... only it doesn't. Java still kicks out with an out of memory error. I can't figure out why as the system is showing 3GB free. Is there some sort of memory limit in the jvm itself that I need to change? I'm pretty screwed if there isn't lol.


Hope someone can help.....


Cheers,

Pete
ASKER CERTIFIED SOLUTION
Avatar of zzynx
zzynx
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of petepalmer
petepalmer

ASKER

Doesn't this have an effect on garbage collection?

Well it runs a LOT faster now regardless....

Guess I didn't need to acquire a brand new workstation with more ram than the starship Enterprise..... oh well - my bad :)

run your application with

java  -Xms3072M  -Xmx3072M  file.class
using  -Xms and -Xmx we are setting the maximum and minumum heap size, so that you can run your application effectively by changing the heap size

here 3072 stands for 3 GB RAM usage
>> oh well - my bad :)
:°D

Thanks