Re: [sqlite] Any tips on reducing memory requirements for small MCU?

2014-10-23 Thread Richard Hipp
On Thu, Oct 23, 2014 at 2:25 PM, Dennis Field wrote: > > > Are there any omit/other preprocessor defines that are particularly helpful > for reducing memory usage? > > SQLITE_SMALL_STACK - but that will require regenerating the amalgamation. -- D. Richard Hipp

Re: [sqlite] Any tips on reducing memory requirements for small MCU?

2014-10-23 Thread Dennis Field
Thanks, all! Sorry for the delayed response. I ran into an SD card reading issue that I'm still trying to solve (multiple block reading), and I've worked around it for now to keep trying to make progress on the database. I have switched to memsys3 and the 60 KB heap seems sufficient for now to

Re: [sqlite] Any tips on reducing memory requirements for small MCU?

2014-10-20 Thread Richard Hipp
On Mon, Oct 20, 2014 at 5:21 PM, Dennis Field wrote: > > When I initialize SQLite, I am instructing it to take a single heap for > memsys5 of 60 * 1024. > Have you tried using memsys3 instead of memsys5? Memsys3 can be more memory-efficient. You might also want to disable

Re: [sqlite] Any tips on reducing memory requirements for small MCU?

2014-10-20 Thread Stephen Chrzanowski
I have no idea what is 100% required in the database, but I THINK you can include some compiler directives that REMOVE certain features. I know FTS is an optional thing, but I don't know if it is included as part of the default build or not. CTE (I think that is it?) might also be something you

Re: [sqlite] Any tips on reducing memory requirements for small MCU?

2014-10-20 Thread Gerry Snyder
One possibility might be to use the long-obsolete SQLite2, which was around when PC's had much smaller memories. I know it is heresy to suggest it, and you would have a lot of recoding to do, but it seems that it might be workable. Gerry Snyder

[sqlite] Any tips on reducing memory requirements for small MCU?

2014-10-20 Thread Dennis Field
I have SQLite compiled for a Cortex M4 with 256 KB of RAM. Currently, as other things on the system are taking up a grand total of about 190 KB, I'm able to allocate about 60KB to SQLite and I'm running out of memory just trying to select a 16-byte blob and a string from a pair of tables. SQL log