The Artima Developer Community
Sponsored Link

Java Answers Forum
outofmemoryerror

5 replies on 1 page. Most recent reply: Jun 3, 2004 2:52 AM by Shashank D. Jha

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 5 replies on 1 page
sweth_murali

Posts: 3
Nickname: sweth
Registered: May, 2004

outofmemoryerror Posted: May 26, 2004 8:34 AM
Reply to this message Reply
Advertisement
How to overcome out of memory error in my java application


Singh M.

Posts: 154
Nickname: ms
Registered: Mar, 2002

Re: outofmemoryerror Posted: May 27, 2004 5:58 AM
Reply to this message Reply
Out of memory errors could be due to memory leaks. Fix those leaks and the errors will go away.

sweth_murali

Posts: 3
Nickname: sweth
Registered: May, 2004

Re: outofmemoryerror Posted: Jun 1, 2004 12:18 AM
Reply to this message Reply
Thanks for your reply

Shashank D. Jha

Posts: 68
Nickname: shashankd
Registered: May, 2004

Re: outofmemoryerror Posted: Jun 3, 2004 2:12 AM
Reply to this message Reply
For non commercial codes you may avoid that by providing an argument to JVM.
But otherwise as suggested you should look into memory leak and avoid it.

Checkout

-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size

do something like following

java -Xms12800 -Xmx26400 <<class file name>>

see if this helps,



regards,
Shashank

Adam Duffy

Posts: 168
Nickname: adamduffy
Registered: Feb, 2003

Re: outofmemoryerror Posted: Jun 3, 2004 2:41 AM
Reply to this message Reply
This error could be down to several different reasons. It usually indicates that some resource has not been released. A typical example would be not closing an IO stream after you have finished using it. Another common occurrence is when some form of recursive loop has no terminating condition.

I suggest you post the relevant code section if you're looking for more specific advice.

Adam

Shashank D. Jha

Posts: 68
Nickname: shashankd
Registered: May, 2004

Re: outofmemoryerror Posted: Jun 3, 2004 2:52 AM
Reply to this message Reply
Yeah.

We cannot make out from little information that has been coughed out.

So, trying to resolve his problem in short, I mean if these suggestions work its fine else will ask for his code.

regards,
shashank

Flat View: This topic has 5 replies on 1 page
Topic: hash question Previous Topic   Next Topic Topic: help on interfacing java with crystal report

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use