• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

out of memory exception

 
Mark Baumeister
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using a linked list and one of the exceptions I'd like to include in the
add or push() method is in the case that the list gets so large that - run out of memory.
However, since I'm not familiar with such an exception, I'm not sure how I would code it.

Can someone tell me if there is a common or known exception for this?

thanks,
MB

e.g.





This topic has no replies.
 
Richard Anderson
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't do much once you've got an OutOfMemoryException. The JVM is...out of memory! I would try and think of ways to prevent this in the first place. Have you played around with the min and max heap size? Run your program in a profiler like JProbe and find out what's taking up the most memory.

Hope that helps!

-Rich
 
Quang Pham
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You make me thing of a program in loop. Check your program code for looping.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic