*
The moose likes Java in General and the fly likes OutOfMemory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "OutOfMemory" Watch "OutOfMemory" New topic
Author

OutOfMemory

Lars Vegas
Greenhorn

Joined: Dec 04, 2001
Posts: 27
Hi there,
i have a question about OutOfMemory Error.
In my application when I toggle between two windows the JVM is always allocating new memory til it reaches about 64 MB. After that it doesn't rise anymore. When opening other windows in the application, the memory will stay at about the same level. but then the whole application is very slow and after a while I will get the OutOfMemory Error. Sometimes earlier, sometimes later. Any ideas about maybe garbage collection or finalization???
any help appreciated.
Lars
Michael Samuel
Greenhorn

Joined: Jun 03, 2002
Posts: 2
Try to call System.gc() and finalize unused objects.
Hi there,
i have a question about OutOfMemory Error.
In my application when I toggle between two windows the JVM is always allocating new memory til it reaches about 64 MB. After that it doesn't rise anymore. When opening other windows in the application, the memory will stay at about the same level. but then the whole application is very slow and after a while I will get the OutOfMemory Error. Sometimes earlier, sometimes later. Any ideas about maybe garbage collection or finalization???
any help appreciated.
Lars
Lars Vegas
Greenhorn

Joined: Dec 04, 2001
Posts: 27
when running System.gc() and finalization, nothing happens. maybe just a little bit of memory is released, but not much. that doesn't seem to work.
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937
Maybe your problem is of the same nature as the one discussed here.
Eugene Kononov.
Mon Mayor
Ranch Hand

Joined: Mar 07, 2002
Posts: 40
I have seen the garbage collector run when the application needs more heap..and that is one of the reasons it is slowing down. Usually I check the memory of the process and collect the max memory it needs and then set the max heap size. Hope this helps.
Lars Vegas
Greenhorn

Joined: Dec 04, 2001
Posts: 27
I've senn the discussion about dispose(), but that doesn't help either.
Maybe we have some references in the program that are not garbageCollected. I just don't know. anyway, if someone has an idea what might cause this problem, don't hesitate to let me know.
Thanx in advance.
Lars Vegas
Greenhorn

Joined: Dec 04, 2001
Posts: 27
I've senn the discussion about dispose(), but that doesn't help either.
Maybe we have some references in the program that are not garbageCollected. I just don't know. anyway, if someone has an idea what might cause this problem, don't hesitate to let me know.
Thanx in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OutOfMemory