Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

java.lang.OutOfMemoryError

  Asked By: Adelina    Date: Feb 18    Category: Java    Views: 820
  

One of my programs keeps giving me:

java.lang.OutOfMemoryError
<<no stack trace available>>

I've tried using "java -Xmx128 " (I only have 128mb of ram), but it
doesn't help. Any ideas on how to fix this? Is there any way to see
how much memory is being used by each component? (In the program
there are around 7 threads, with 4/5 objects within each thread, and
also about 5 static objects that all the threads access.)

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Corinne Rogers     Answered On: Feb 18

Are you using ObjectOutputStream and ObjectInputStream
?

 
Answer #2    Answered By: Agatha Miller     Answered On: Feb 18

This has happened to me many a time and is hard to pinpoint where it
is coming from.

If you are out of stack space and have 128mb of ram  your hardware is
not the problem.

You probable have some kind of infinite loop in your program (check
all of your for loops and while loops to make sure the variable that
is being incremented is actually eventually going to exit the loop.)
this will cause your computer to stack up so many variables that the
stack space (Which I am informed is quite large) will run out.

 
Answer #3    Answered By: Sonya Flores     Answered On: Feb 18

Perhaps you could download a trial version of JProbe (
http://www.sitraka.com/software/jprobe/ ) and use it to find the
problem.

 
Didn't find what you were looking for? Find more on java.lang.OutOfMemoryError Or get search suggestion and latest updates.




Tagged: