ART: Add object reclaim support
Add support for the object free callback.
Refactor code in support. Add test.
Bug: 31384923
Test: m test-art-host
Test: m test-art-host-run-test-905-object-free
Test: m ART_USE_READ_BARRIER=true test-art-host-run-test-905-object-free
Change-Id: Icde40ad464c723cfe2f7660c07cd2f79b6dc2032
diff --git a/test/904-object-allocation/src/Main.java b/test/904-object-allocation/src/Main.java
index f15c1c2..9a089bd 100644
--- a/test/904-object-allocation/src/Main.java
+++ b/test/904-object-allocation/src/Main.java
@@ -40,7 +40,7 @@
}
public static void doTest(ArrayList<Object> l) throws Exception {
- setupCallback();
+ setupObjectAllocCallback();
enableAllocationTracking(null, true);
@@ -127,6 +127,6 @@
}
}
- private static native void setupCallback();
+ private static native void setupObjectAllocCallback();
private static native void enableAllocationTracking(Thread thread, boolean enable);
}