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

Side by Side Diff: tests/standalone/fragmentation_test.dart

Issue 2984363004: Migrate first block of tests in standalone to standalone_2 (Closed)
Patch Set: Remove Expect.throws Created 3 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Deliberately fragment the heap and test that GC peformance does not
6 // break down. See https://github.com/dart-lang/sdk/issues/29588
7 // Normally runs in about 6-7 seconds on an x64 machine, using about 2.5Gbytes
8 // of memory.
9 //
10 // This test is deliberately CPU-light and so it can make a lot of
11 // progress before the concurrent sweepers are done sweeping the heap.
12 // In that time there is no freelist and so the issue does not arise.
13 // VMOptions=--no-concurrent-sweep
14
15 main() {
16 final List<List> arrays = [];
17 // Fill up heap with alternate large-small items.
18 for (int i = 0; i < 500000; i++) {
19 arrays.add(new List(260));
20 arrays.add(new List(1));
21 }
22 // Clear the large items so that the heap is full of 260-word gaps.
23 for (int i = 0; i < arrays.length; i += 2) {
24 arrays[i] = null;
25 }
26 // Allocate a lot of 300-word objects that don't fit in the gaps.
27 for (int i = 0; i < 600000; i++) {
28 arrays.add(new List(300));
29 }
30 }
OLDNEW
« no previous file with comments | « tests/standalone/float_array_test.dart ('k') | tests/standalone/http_launch_data/http_isolate_main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698