Heap

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
jedistarAsked:
Who is Participating?
 
CEHJCommented:
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

0
 
jedistarAuthor Commented:
Q1 & Q2, thanks

For 3, i would like to ask, what does conservative collector do exactly?
0
 
TimYatesCommented:
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.
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.