Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

Why do Java throw the exception 'OutOfMemory' ?

Thread view: 
Red Orchid - 11 Jun 2006 14:40 GMT
Sun has made the exception 'OutOfMemory' to be
under the control of Java VM.
Why?

Besides ..
Though Java VM has the options 'MinHeapFreeRatio' and
'MaxHeapFreeRatio', she has the option 'Xmx'.
Why is 'Xmx' needed ?

When a program has the trouble like 'OutOfMemory',
it is not a valid way to increase the value of 'Xmx'
because you are not very sure that the max memory
size of the program will be 'xxxx' MBytes.

Let's consider a program that shows the list of user data.
The max size of user data is unknown for the most part.
And the magnitude of data displayed on the program is
at the discretion of user.   Therefore,
the max memory size of the program is not determinate.

I think that the exception like 'OutOfMemory' has to be
under the control of OS, not Java VM.

What is your comment ?
Thanks.
Mladen Adamovic - 11 Jun 2006 19:56 GMT
> I think that the exception like 'OutOfMemory' has to be
> under the control of OS, not Java VM.

In that case if you have memory leaks (i.e. improper handling of the
linked list) one JVM can take all the memory.

If you have several Tomcat servers on one computer (round robin on dual
core computer) you have more JVM which cannot take as much memory as
they would like so there are advantages of that approaches.

But, I agree, in most cases it could be under the control of OS and to
give as much memory as available to JVM.

Signature

Mladen Adamovic
http://www.online-utility.org  http://www.shortopedia.com
http://www.froola.com  http://www.gift-idea4u.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.