multithreading - How can I allocate enough memory for this program to m_fork in C? -
i have application running on irix uses m_fork() create number of processes. source code.
when run application 3 forks, works expected. when inquire 4 forks, fails fork "enomem" error:
bash-2.05$ ./hello 3 process spawn limit 8 hello world process 1 hello world process 2 hello world process 0 2nd line: hello world process 1 2nd line: hello world process 2 2nd line: hello world process 0 bash-2.05$ ./hello 4 process spawn limit 8 m_fork() did not work
i know memory allocation issue because when throw in malloc(900000000);
right before m_fork()
, works expected.
while prepare problem, it's not suitable solution because it's arbitrarily big number. how can dynamically allocate plenty memory forks?
e: core question i'm trying answered here is, "how can allocate plenty memory forks?"
c multithreading memory irix
No comments:
Post a Comment