[NTLUG:Discuss] Stack size or malloc problem
Ralph Green, Jr
severian at mail.joimail.com
Wed Jul 14 04:54:16 CDT 2004
Howdy,
I have been having a lot of problems with a program I am working on
that uses the MySQL database. It is a C program and itdoes many
thousands of database updates. I start having odd little problems that
look to me like either 1)insufficient stack space, or 2) malloc and free
problems. I know my mallocs and free are right, but I don't know about
MySQLs.
1. How do you specify the stack size when linking an application. I
tried the preprocessor option, but it does not seem to work. In fact, I
wonder how to tell how large the stack on an application is. I have
been going through a number of documents, but I have not found anything.
2. My OS is a 2.4.21 kernel and the gcc is ver 2.95. The program
usually seg faults in localtime() or mktime() or fclose(). The code
that fails is good, so it must be dying as a side affect of something
else. I say the code is good because I have cut it out, put it in a
small test program and it passed. I can tell where it dies using gdb,
but I am stumped. If anyone has an idea of where to look, I would
appreciate it.
Good day,
Ralph
More information about the Discuss
mailing list