1
我有主的過程,會生成50000個工藝是否有可能在SimGrid中產生大量的進程?
int master(int argc, char* argv[])
{
for (int i = 0; i < 10000; i++){
string name = tostring(i);
MSG_process_create(name.c_str(), some_code, NULL, MSG_host_self());
}
return 0;
}
但是當我運行這段代碼我有一個錯誤:
[0.000000] /home/ubuntu/Downloads/simgrid/src/simix/smx_context.cpp:187: [xbt/CRITICAL] Failed to protect stack: Cannot allocate memory
我怎樣才能克服它或它是不可能的?