FoolyCooly
Registered
I have been wrestling with this problem longer than I realized. Programs that work fine while working with smaller values, often crash while working with larger values. I always thought this was some flaw in my code until a proffesor began talking about linux and windows stack sizes. Apparently, both windows and the mac have comparitively low stack sizes when juxtaposed with linux.
My current program deals with an array of <1048576> integers, int array[1048576], and it gives me a segmentation fault in both PB and in Terminal, but is perfectly happy on my school's linux server. The array initializes, but always crashes after x number of operations working with the array.
I've tried using the # (stacksize) command with g++ but that doesn't really seem to work on the above array. I was curious if anyone else has experienced this and learned a good workaround aside from re-coding everything.
Thanks, sincerely, for any help
My current program deals with an array of <1048576> integers, int array[1048576], and it gives me a segmentation fault in both PB and in Terminal, but is perfectly happy on my school's linux server. The array initializes, but always crashes after x number of operations working with the array.
I've tried using the # (stacksize) command with g++ but that doesn't really seem to work on the above array. I was curious if anyone else has experienced this and learned a good workaround aside from re-coding everything.
Thanks, sincerely, for any help
