[NTLUG:Discuss] Stack size or malloc problem

Burton M. Strauss III Burton_Strauss at comcast.net
Sun Jul 18 11:52:41 CDT 2004


Run it under valgrind.  That will show you the error of your ways and pretty
quickly too.

-----Burton

> -----Original Message-----
> From: discuss-bounces at ntlug.org [mailto:discuss-bounces at ntlug.org]On
> Behalf Of Ralph Green, Jr
> Sent: Wednesday, July 14, 2004 4:54 AM
> To: NTLUG Discussion List
> Subject: [NTLUG:Discuss] Stack size or malloc problem
>
>
> 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
>
>
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss




More information about the Discuss mailing list