changeset 1894:b25a1f3183e9

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: jmasa, dfazunen
author kzhaldyb
date Thu, 17 Dec 2015 16:20:09 +0300
parents 418029ac33ca
children 4be1cd68310d
files test/lib/sun/hotspot/WhiteBox.java
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/lib/sun/hotspot/WhiteBox.java	Thu Dec 17 19:54:48 2015 -0500
+++ b/test/lib/sun/hotspot/WhiteBox.java	Thu Dec 17 16:20:09 2015 +0300
@@ -140,6 +140,23 @@
     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();