Closed
Description
Each isolate that is created seems to take about 35 MB of memory until it is closed and GCd. This affects the number of asynchronous file system or socket operations that can be created, since they are implemented with isolates (currently). This also means that no system with more than a couple hundred isolates can work.
This seems to be true on both the debug and release ia32 builds. The following code shows the resulting memory use. If port.close() is called, then the isolates are GCd and memory use stays below 100 MB.
class A extends Isolate {
A() : super.light(); // or heavy, makes no difference.
void main() { /* port.close();*/ }
}
main() {
var a = new A();
for (var j = 0; j < 100; ++j ) {
a.spawn();
print(j);
}
}