I have a program that takes input n
from the command line, and, as part of its operation, tries to call the following code:
pthread_t threads[n*n];
Now, for any n <= 1023
, this works fine, but the moment I try to use n > 1023
, I get a segfault. It is this particular line that causes it - my code does not advance beyond it. I'm a little confused as to why this is happening, and would appreciate all possible help.