< prev index next >

test/lib/sun/hotspot/WhiteBox.java

Print this page
rev 1668 : 8132723: Add tests which check that soft references to humongous objects should work correctly
8132724: Add tests which check that weak references to humongous objects should work correctly
Reviewed-by: duke

@@ -131,10 +131,27 @@
   public         boolean g1IsHumongous(Object o) {
     Objects.requireNonNull(o);
     return g1IsHumongous0(o);
   }
 
+  private native boolean g1BelongsToHumongousRegion0(long adr);
+  public         boolean g1BelongsToHumongousRegion(long adr) {
+    if (adr == 0) {
+      throw new IllegalArgumentException("adr argument should not be null");
+    }
+    return g1BelongsToHumongousRegion0(adr);
+  }
+
+
+  private native boolean g1BelongsToFreeRegion0(long adr);
+  public         boolean g1BelongsToFreeRegion(long adr) {
+    if (adr == 0) {
+      throw new IllegalArgumentException("adr argument should not be null");
+    }
+    return g1BelongsToFreeRegion0(adr);
+  }
+
   public native long    g1NumMaxRegions();
   public native long    g1NumFreeRegions();
   public native int     g1RegionSize();
   public native MemoryUsage g1AuxiliaryMemoryUsage();
   private  native Object[]    parseCommandLine0(String commandline, char delim, DiagnosticCommand[] args);
< prev index next >