The code below works fine if factors is small but when it gets larger I get a segmentation fault.The first instance I have encountered is at a size of ~800.000.
This should easily fit into memory or what am I missing?
Appreciate any help.
char *fgs_arr [facs().size()],
*true_arr[facs().size()],
*maps_arr[facs().size()];
You are running out of Stack (The place where locally declared memory goes). You’ll either need to dynamically declare it (this goes to the heap which is much larger) or increase stack size.