954,228 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Out of memory

I am doing some very nasty computation using java but it always gives me a java.lang.OutOfMemory Error,after this nothing on the GUI works.i think its ok to have that error but atleast things should work afterwards.

Please Advise

nanosani
Unauthenticated Liar
Team Colleague
1,830 posts since Jul 2004
Reputation Points: 45
Solved Threads: 56
 

I am doing some very nasty computation using java but it always gives me a java.lang.OutOfMemory Error,after this nothing on the GUI works.i think its ok to have that error but atleast things should work afterwards.

Please Advise

It'snot okay to have that exception. My "Please Advise" is that you post code so we can at least see what you're trying to do.

Unless you're loading large amounts of data into memory (i.e. more than will fit in the memory allocated to the VM), this shouldn't happen. A common cause of this problem is some sort of out-of-control recursion. Try running your code with some sort of stack trace enabled so you can find at what point in your code the exception is being raised.

--sg

gusano79
Posting Pro
519 posts since May 2004
Reputation Points: 182
Solved Threads: 77
 

Hey sani,

What does this code do? are you doing lots of I/O? or creating many objects?

Ed

cosi
Junior Poster
153 posts since Aug 2004
Reputation Points: 17
Solved Threads: 1
 

OOPs ! one of so many loops in my code was not terminating n it was consistantly writing into the memory :o . Thanks for the help fellas.

nanosani
Unauthenticated Liar
Team Colleague
1,830 posts since Jul 2004
Reputation Points: 45
Solved Threads: 56
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You