jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes out of memory exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "out of memory exception" Watch "out of memory exception" New topic

out of memory exception

Mark Baumeister

Joined: Sep 27, 2007
Posts: 6
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?



This topic has no replies.
Richard Anderson
Ranch Hand

Joined: May 20, 2005
Posts: 61
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, SCJP 1.4
Quang Pham
Ranch Hand

Joined: Nov 29, 2005
Posts: 47
You make me thing of a program in loop. Check your program code for looping.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: out of memory exception
It's not a secret anymore!