| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // VMOptions=--old_gen_heap_size=32 | 5 // VMOptions=--old_gen_heap_size=64 |
| 6 | 6 |
| 7 library slow_consumer3_test; | 7 library slow_consumer3_test; |
| 8 | 8 |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 import 'dart:isolate'; | 10 import 'dart:isolate'; |
| 11 | 11 |
| 12 const int KB = 1024; | 12 const int KB = 1024; |
| 13 const int MB = KB * KB; | 13 const int MB = KB * KB; |
| 14 const int GB = KB * KB * KB; | 14 const int GB = KB * KB * KB; |
| 15 | 15 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // file). If the consumer doesn't pause the data-provider it will run out of | 72 // file). If the consumer doesn't pause the data-provider it will run out of |
| 73 // heap-space. | 73 // heap-space. |
| 74 | 74 |
| 75 dataGenerator(100 * MB, 512 * KB) | 75 dataGenerator(100 * MB, 512 * KB) |
| 76 .pipe(new SlowConsumer(200 * MB, 3 * MB)) | 76 .pipe(new SlowConsumer(200 * MB, 3 * MB)) |
| 77 .then((count) { | 77 .then((count) { |
| 78 port.close(); | 78 port.close(); |
| 79 Expect.equals(100 * MB, count); | 79 Expect.equals(100 * MB, count); |
| 80 }); | 80 }); |
| 81 } | 81 } |
| OLD | NEW |