-
Bug
-
Resolution: Cannot Reproduce
-
P5
-
5.0
-
x86
-
windows_xp
FULL PRODUCT VERSION :
JDK1.5.0_04
ADDITIONAL OS VERSION INFORMATION :
Windows XP Professional with SP1 (Simplified Chinese)
EXTRA RELEVANT SYSTEM CONFIGURATION :
NetVista 6792-38c (CPU: Pentium 4 2.0GHz, Memory: 512MB, Video: NVIDIA GeForce2 MX)
A DESCRIPTION OF THE PROBLEM :
I use java.lang.management package, i want get Initial Memory value from instance of MemoryUsage, but Initial Memory value equal zero.
I use IBM-JDK with re-test, i got Initial Memory value equal 4M
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run test case: "java TestFJ"
2. Java VM memory usage show on screen
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Initial Memory is available value
ACTUAL -
Initial Memory = 0
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.Date;
import java.util.Properties;
import java.lang.management.*;
public class TestFJ {
public static void main(String[] argv) {
System.out.println("\n Memory usage ");
System.out.println("\n ============ ");
MemoryUsage mu = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
System.out.println(" \nInitial Memory = " + mu.getInit() +
" Used Memory = " + mu.getUsed() +
" Maximum Memory = " + mu.getMax() +
" Committed Memory = " + mu.getCommitted());
}
}
---------- END SOURCE ----------
JDK1.5.0_04
ADDITIONAL OS VERSION INFORMATION :
Windows XP Professional with SP1 (Simplified Chinese)
EXTRA RELEVANT SYSTEM CONFIGURATION :
NetVista 6792-38c (CPU: Pentium 4 2.0GHz, Memory: 512MB, Video: NVIDIA GeForce2 MX)
A DESCRIPTION OF THE PROBLEM :
I use java.lang.management package, i want get Initial Memory value from instance of MemoryUsage, but Initial Memory value equal zero.
I use IBM-JDK with re-test, i got Initial Memory value equal 4M
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run test case: "java TestFJ"
2. Java VM memory usage show on screen
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Initial Memory is available value
ACTUAL -
Initial Memory = 0
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.Date;
import java.util.Properties;
import java.lang.management.*;
public class TestFJ {
public static void main(String[] argv) {
System.out.println("\n Memory usage ");
System.out.println("\n ============ ");
MemoryUsage mu = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
System.out.println(" \nInitial Memory = " + mu.getInit() +
" Used Memory = " + mu.getUsed() +
" Maximum Memory = " + mu.getMax() +
" Committed Memory = " + mu.getCommitted());
}
}
---------- END SOURCE ----------