| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2014, 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 library gc_script; |
| 6 |
| 7 import 'dart:async'; |
| 8 import 'dart:io'; |
| 9 |
| 10 List<int> data; |
| 11 |
| 12 void grow(int iterations, int size, Duration duration) { |
| 13 if (iterations <= 0) { |
| 14 return; |
| 15 } |
| 16 data = new List<int>(size); |
| 17 new Timer(duration, () => grow(iterations - 1, size, duration)); |
| 18 } |
| 19 |
| 20 |
| 21 main() { |
| 22 print(''); // Print blank line to signal that we are ready. |
| 23 |
| 24 grow(100, 1 << 24, new Duration(seconds: 1)); |
| 25 |
| 26 // Wait until signaled from spawning test. |
| 27 stdin.first.then((_) => exit(0)); |
| 28 } |
| OLD | NEW |