< prev index next >

test/gc/g1/TestShrinkDefragmentedHeap.java

Print this page

        

*** 29,49 **** * "ssssHssssHssssHssssHssssHssssHssssH" * 2. release all allocated object except the last humongous one * "..................................H" * 3. invoke gc and check that memory returned to the system (amount of committed memory got down) * ! * @library /testlibrary * @modules java.base/jdk.internal.misc * java.management/sun.management */ import java.lang.management.ManagementFactory; import java.lang.management.MemoryUsage; import java.util.ArrayList; import java.util.List; import static jdk.test.lib.Asserts.*; ! import jdk.test.lib.ProcessTools; ! import jdk.test.lib.OutputAnalyzer; import com.sun.management.HotSpotDiagnosticMXBean; public class TestShrinkDefragmentedHeap { // Since we store all the small objects, they become old and old regions are also allocated at the bottom of the heap // together with humongous regions. So if there are a lot of old regions in the lower part of the heap, --- 29,49 ---- * "ssssHssssHssssHssssHssssHssssHssssH" * 2. release all allocated object except the last humongous one * "..................................H" * 3. invoke gc and check that memory returned to the system (amount of committed memory got down) * ! * @library /test/lib * @modules java.base/jdk.internal.misc * java.management/sun.management */ import java.lang.management.ManagementFactory; import java.lang.management.MemoryUsage; import java.util.ArrayList; import java.util.List; import static jdk.test.lib.Asserts.*; ! import jdk.test.lib.process.OutputAnalyzer; ! import jdk.test.lib.process.ProcessTools; import com.sun.management.HotSpotDiagnosticMXBean; public class TestShrinkDefragmentedHeap { // Since we store all the small objects, they become old and old regions are also allocated at the bottom of the heap // together with humongous regions. So if there are a lot of old regions in the lower part of the heap,
< prev index next >