OLD | NEW |
1 // Copyright (c) 2014, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'dart:fletch'; | 5 import 'dart:fletch'; |
6 | 6 |
7 void run2() { | 7 void run2() { |
8 } | 8 } |
9 | 9 |
10 void run1() { | 10 void run1() { |
11 // TODO(kasperl): Ideally, we should be able to | 11 // TODO(kasperl): Ideally, we should be able to |
12 // run with close to 500,000 processes even on | 12 // run with close to 500,000 processes even on |
13 // a 32-bit machine with 2GB of available address | 13 // a 32-bit machine with 2GB of available address |
14 // space. Right now, we get close to that but | 14 // space. Right now, we get close to that but |
15 // not quite close enough (~150,000). Note that ASan | 15 // not quite close enough (~150,000). Note that ASan |
16 // also introduces quite an overhead. | 16 // also introduces quite an overhead. |
17 for (int i = 0; i < 150; i++) { | 17 for (int i = 0; i < 150; i++) { |
18 Process.spawnDetached(run2); | 18 Process.spawnDetached(run2); |
19 } | 19 } |
20 } | 20 } |
21 | 21 |
22 void main() { | 22 void main() { |
23 for (int i = 0; i < 1000; i++) { | 23 for (int i = 0; i < 1000; i++) { |
24 Process.spawnDetached(run1); | 24 Process.spawnDetached(run1); |
25 } | 25 } |
26 } | 26 } |
OLD | NEW |