On Tuesday, Oct 28, 2003, at 22:47 US/Eastern, Koen van der Drift wrote:
On Tuesday, Oct 28, 2003, at 22:12 US/Eastern, Charles Lepple wrote:
#include <std.disclaimer> /* haven't tried this myself */ #include <sys/types.h> #include <sys/time.h> #include <sys/resource.h>
struct rlimit rlim;
getrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = RLIM_INFINITY; setrlimit(RLIMIT_STACK, &rlim);
Well, I figured out why the program is crashing. The code is assigning some very large arrays as a static variables, which are created before main() is called. They use all available stack, which causes the crash. If I decrease the size of the array, the program starts up, but I'm not sure if the smaller array will cause some harm later on. Someone on a newsgroup suggested to use compiler/linker settings that either move the static variables to their own memory segment or increase the stack size.
Would this be possible?
thanks,
- Koen.
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Fink-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-devel