summaryrefslogtreecommitdiffstats
path: root/test/098-ddmc
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2015-04-28 12:11:22 -0700
committerJeff Hao <jeffhao@google.com>2015-04-28 12:11:22 -0700
commit67aea0a0b078c7f6ed780e5fafb31e9849127f79 (patch)
tree975d975358182e373e8e0903d1b9bc1da1bd71a8 /test/098-ddmc
parent458d91b0f72293c9dd347feecf535db0682ccd71 (diff)
downloadandroid_art-67aea0a0b078c7f6ed780e5fafb31e9849127f79.tar.gz
android_art-67aea0a0b078c7f6ed780e5fafb31e9849127f79.tar.bz2
android_art-67aea0a0b078c7f6ed780e5fafb31e9849127f79.zip
Change ddmc run-test to make new objects instead of strings.
Before, the test was creating new strings until overflowing allocations, which was half string objects and half character arrays. Now, it allocates all strings with the character data, which is larger than before, causing the test to run out of memory. Allocating only objects prevents the test from running out of memory. Change-Id: Icf3f0fd2ae847e76a9b8d5dfb762be92de16aaa3
Diffstat (limited to 'test/098-ddmc')
-rw-r--r--test/098-ddmc/src/Main.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/098-ddmc/src/Main.java b/test/098-ddmc/src/Main.java
index 962bd7f7d1..f41ff2a94a 100644
--- a/test/098-ddmc/src/Main.java
+++ b/test/098-ddmc/src/Main.java
@@ -44,7 +44,7 @@ public class Main {
System.out.println("Confirm when we overflow, we don't roll over to zero. b/17392248");
final int overflowAllocations = 64 * 1024; // Won't fit in unsigned 16-bit value.
for (int i = 0; i < overflowAllocations; i++) {
- new String("fnord");
+ new Object();
}
Allocations after = new Allocations(DdmVmInternal.getRecentAllocations());
System.out.println("before < overflowAllocations=" + (before.numberOfEntries < overflowAllocations));