Operating Systems – CSCI 402
Modified Program
int nprimes; // in bss region
int *prime; // in bss region
int main(int argc, char *argv[]) { // in stack
int i; // in stack
int current = 2; // in stack
nprimes = atoi(argv[1]);
prime = (int*)malloc(nprimes*sizeof(int));
prime[0] = current;
for (i=1; i