Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: runtime/vm/object_test.cc

Issue 344913003: Verify that GC can handle trailing fillers in large pages. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/gc_sweeper.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_test.cc
===================================================================
--- runtime/vm/object_test.cc (revision 37564)
+++ runtime/vm/object_test.cc (working copy)
@@ -2050,6 +2050,18 @@
EXPECT(obj.IsTypedData());
left_over_array ^= obj.raw();
EXPECT_EQ((6 * kWordSize), left_over_array.Length());
+
+ // 4. Verify that GC can handle the filler object for a large array.
+ array = GrowableObjectArray::New((1 * MB) >> kWordSizeLog2);
+ EXPECT_EQ(0, array.Length());
+ for (intptr_t i = 0; i < 1; i++) {
+ value = Smi::New(i);
+ array.Add(value);
+ }
+ new_array = Array::MakeArray(array);
+ EXPECT_EQ(1, new_array.Length());
+ Isolate::Current()->heap()->CollectAllGarbage();
+ EXPECT_EQ(1, new_array.Length());
}
« no previous file with comments | « runtime/vm/gc_sweeper.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698