We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Heap

jedistar
jedistar asked
on
Medium Priority
2,957 Views
Last Modified: 2013-11-23
1. I tried to set my heapsize, it gives me an error:

C:\>java -Xms 512M -Xmx 1024M -Xss 1024M
Invalid initial heap size: -Xms
Could not create the Java virtual machine.

2. when setting the above, does values like 512, 512B, 512K work? whats the min and max?

3. Is Conservative collectors faster or slower than normal Garbage collectors?

4. What is generational collection, how does it work differ from reference counting & tracing collection
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016
Commented:
1. >>java -Xms 512M -Xmx 1024M -Xss 1024M

No spaces:

java -Xms512M -Xmx1024M -Xss1024M

2. when setting the above, does values like 512, 512B, 512K work?

Yes

>>whats the min and max?

Don't know that there are any - machine dependent

3. That would have to be measured for a particular case

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Q1 & Q2, thanks

For 3, i would like to ask, what does conservative collector do exactly?
CERTIFIED EXPERT
Top Expert 2004
Commented:
From: http://java.sun.com/developer/technicalArticles/ALT/RefObj/

-------------

Conservative Garbage Collection: If you use the Java Native Interface (JNI) API to make C calls, the garbage collector might see something in memory created by the C code that looks like a pointer, but is actually garbage. In this case, the memory is not garbage collected because the Java VM is conservative and does not reclaim memory that looks like it could be allocated to a pointer.
CERTIFIED EXPERT
Top Expert 2016

Commented:
:-)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.