Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Machine > Re: Heap and Me...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 7 Topic 773 of 803
Post > Topic >>

Re: Heap and Memory Footprint

by hbdere <hbdere@[EMAIL PROTECTED] > Jun 1, 2007 at 11:20 PM

On May 31, 8:51 pm, "parminde...@[EMAIL PROTECTED]
" <parminde...@[EMAIL PROTECTED]
>
wrote:
> I did that, but that doesn't help. I set the size to 64 megs. but the
> VM size behaved the same way. Please let me know if there's something
> else that can be done.
>
> Also, can you please point me to the diff between the VM size and the
> heap size?
I can only do some guesswork, but it should be like this: the heap is
the memory where the Java program running inside the VM may allocate
objects. Together with the stack, it limits the amount of memory the
Java program may consume. So, by using -Xmx (and -Xms), you may modify
this amount of memory; and judging from your description of JProf this
already works fine.
However, the virtual machine needs memory for itself - this should
include loaded class files, but may also contain hotspot-compiled
code, garbage collection data and such things. If your application is
really, really big (like a Spring web application which requires about
20 JAR files, each a few MB big) it does not seem too unlikely that
your VM requires so much memory.

There are OS-dependent ways of limiting the memory a single
application may consume. For Linux, using a csh shell gives you the
"limit" command (see "man csh" for the syntax) that allows you to
limit memory usage of any process. However, whether this will keep the
VM from crashing is another question; if it is just caching some data,
it may be forced to cope with the tighter memory limit, but if it
really needs memory that big, you are lost, as there is nothing you
can do (besides checking out other VM, like the BEA JRockit engine,
which might be a little more sensible towards those issues - but
again, I am just guessing.)

Regards,
  H.




 7 Posts in Topic:
Heap and Memory Footprint
"parmindersk@[EMAIL   2007-05-30 12:22:26 
Re: Heap and Memory Footprint
Joshua Cranmer <Pidgeo  2007-05-30 20:53:25 
Re: Heap and Memory Footprint
"parmindersk@[EMAIL   2007-05-31 11:51:16 
Re: Heap and Memory Footprint
David Gourley <dave@[E  2007-06-04 20:32:00 
Re: Heap and Memory Footprint
hbdere <hbdere@[EMAIL   2007-06-01 23:20:51 
Re: Heap and Memory Footprint
"parmindersk@[EMAIL   2007-06-08 20:09:49 
Re: Heap and Memory Footprint
David Gourley <dave@[E  2007-06-11 22:05:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 1:26:11 CDT 2008.