Revert "Fix region space when used with SetLengthToUsableSizeVisitor. am: 69ddc6dada"
This reverts commit a2047716fba7f844faad68d57b0350a945f06de5.
Due to b/65978768, a change that should have been skipped (ag/2920332) on its way into oc-dr1-dev due to Merged-In was in fact not skipped. This revert will return the tree to how it is intended to be.
BUG:65978768
Merged-In: I112888af747af9af5aa28bcf15d6ac4737699828
Change-Id: I0b4052d4e063aabe7ffc26114814cfd0a06d21ec
diff --git a/test/659-unpadded-array/src/Main.java b/test/659-unpadded-array/src/Main.java
deleted file mode 100644
index 80fd6e2..0000000
--- a/test/659-unpadded-array/src/Main.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import dalvik.system.VMRuntime;
-
-public class Main {
- public static void main(String[] args) {
- // Call our optimization API, we used to have a bug in the RegionSpace on large
- // objects allocated through it.
- Object[] o = (Object[]) VMRuntime.getRuntime().newUnpaddedArray(Object.class, 70000);
-
- // Make the test run for 30 seconds to be less dependent on GC heuristics.
- long time = System.currentTimeMillis();
- int i = 1;
- do {
- allocateIntArray(i);
- for (int j = 0; j < o.length; j++) {
- if (o[j] != null) {
- // Just print, not throw, to get into "interesting" issues (eg the first
- // element that will not be null is the class of the object, the second is
- // actually the first element of the int array).
- System.out.println("Unexpected value: " + o[j]);
- }
- }
- if (i < 100000) {
- i++;
- } else {
- i = 0;
- }
- } while (System.currentTimeMillis() - time < 30000);
- }
-
- static void allocateIntArray(int i) {
- int[] intArray = new int[i];
- for (int j = 0; j < intArray.length; j++) {
- intArray[j] = 1;
- }
- }
-}