Use the right class loader allocator in ReallocMethods.
Otherwise we would leak memory.
Also complies with the JitCodeCache assumption that ArtMethods
are allocated with the classloader that loaded the class where
those ArtMethods hang.
bug: 64241268
Test: 661-classloader-allocator
Change-Id: I9e4ddbf8f40547084a1a4983459db48f68743cc7
diff --git a/test/661-classloader-allocator/info.txt b/test/661-classloader-allocator/info.txt
new file mode 100644
index 0000000..872b5e0
--- /dev/null
+++ b/test/661-classloader-allocator/info.txt
@@ -0,0 +1,3 @@
+Regression test for copied methods which used to not
+be (re-)allocated with the right class loader allocator,
+which crashed the JIT profiler.