I just want to perform a test, that answers a question:
How much resources would be occupied totally if I run following code from a program that occupies, say, 1G of memory itself? Here is the code:
unless (fork) {
unless (fork) {
`myScript.pl PARAM1 PARAM2 PARAM3`;
exit 0;
}
exit 0;
}
wait;
myScript.pl itself occupies a little of resources. I'm just afraid that when I fork() a program that occupies 1G of memory it would lead to elseone 1G of memory occupied.
Could anyone tell me either how to make a program occupy a lot of memory or answer a question above? Thanks in advance.
PS I work under Linux