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 2 of 7 Topic 773 of 803
Post > Topic >>

Re: Heap and Memory Footprint

by Joshua Cranmer <Pidgeot18@[EMAIL PROTECTED] > May 30, 2007 at 08:53 PM

parmindersk@[EMAIL PROTECTED]
 wrote:
> I used JProf to see that my Swing app has 40 megs of heap allocated to
> it. However, over time VM size of the java.exe process keeps on rising
> and at times hits 300 megs. I understand that the JVM may be using
> this memory for internal purposes. But is there a way to limit the
> size to which the VM grows?
> 
> In short if I need to tell my customers that when they run my app the
> VM size will not grow higher than some limit. Are there any VM
> parameters I can use to ensure this.
> 

 From Sun's java command line reference (keep in mind: this is a 
'non-standard' option, and is only guaranteed for Java versions ~ 1.1 -
6):

-Xmxn
     Specify the maximum size, in bytes, of the memory allocation pool. 
This value must a multiple of 1024 greater than 2MB. Append the letter k 
or K to indicate kilobytes, or m or M to indicate megabytes.
  (e.g. -Xmx40m)

This is the URL for the Java 6 version of the command line:
http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html#nonstandard

and the earlier versions can be obtained by changing the javase/6/ to 
j2se/1.{5,4.2,?}/




 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 5:17:51 CDT 2008.