Sorry for the ambiguous description. You are correct that the issue is the stack size. However, I have already maxed out our stack size and I am trying to bring the SQLite down to within its limits which is 2K. I am implementing the SQLITE_SMALL_STACK option and hopefully that'll bring it within size limits. Thanks!
Andrew Beal Office: 508-289-2970 Email: [email protected] -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Richard Hipp Sent: Tuesday, July 30, 2013 9:55 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Minimizing Internal Function Calls in SQLite On Tue, Jul 30, 2013 at 9:45 AM, Andrew Beal <[email protected]> wrote: > Our vendor provided a custom C compiler which is overflowing the stack > with the increased depth of the call table which then overflows into > other memory. > Your description above is ambiguous, but I interpret it to mean that it not really the call stack depth that is the problem, but rather the size of the stack. This is a common problem on embedded systems. Enabling SQLITE_SMALL_STACK will decrease the amount of stack space used by SQLite. You should also have an option in your build environment to increase the amount of stack space allocated to the process. I recommend you do so. SQLite has been used in as little as 2KB of stack space before, but that was several years ago. Also, the amount of stack space used depends on the complexity of your SQL statements. (Simple SQL statements use much less stack space then complex SQL statements.) I recommend that you vary the size of the stack frame in your environment until you find a size that works. Then double that size so that you have a good margin. -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

