On Friday, Oct 31, 2003, at 21:11 US/Eastern, David Brown wrote:
What do you mean by assigning large arrays? Are they declared at the top level in the C file?
Yes, here is a snippet:
static int myarray[20][10000] static int anotherarray[20][10000]
int main (int argc char** argv)
{
int labels[20];
int names[10000];
float num[10000];
...These should go into the data segment, and should even be allocated by the executable itself.
Have you tried running gdb on the program to see if you can catch the problem? Gdb does break on main, so if it is truly happening before that, you won't be able to catch it.
It happens on the line int main (int argc char** argv)
Another useful thing, run 'size progname' should give you info about the
sizes of the various segments the program is using. Static variables
should show up here.
This is the output:
[RubyTuesday:~] koen% size /sw/bin/cirdna __TEXT __DATA __OBJC others dec hex 20480 1601536 0 40960 1662976 196000
Sofar I found two solutions. 1. the user needs to type ulimit stack before executing the program, or 2. I set the value of 10000 to 100. Both have their disadvantage.
So I was hoping a compiler and or linker setting could solve this.
- 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
