On Apr 20, 2009, at 5:32 PM, Jason Boehle wrote:

> I have written an application for the iPhone called Grocery iQ that
> uses SQLite.  I don't link to or use the built-in SQLite library on
> the iPhone.  Instead, I compile the SQLite amalgamation into the
> executable.  The SQLite version currently being used in our app is
> 3.6.7.

I sent instructions to Brian Killen on how you can download the latest  
version of SQLite+CEROD.  Perhaps recompiling will help.

> * before opening the database, the only other SQLite API calls are:
>        sqlite3_config(SQLITE_CONFIG_HEAP, &mSqliteMemory[0], 3145728,
> 512); // mSqliteMemory is declared as: unsigned char
> mSqliteMemory[3145728];

You will probably do better to allocate most of that 3MB to page cache  
using sqlite3_config(SQLITE_CONFIG_PAGECHACHE, ...).  The assign 100K  
or so to each database connection's lookaside memory allocator using  
sqlite3_db_config(SQLITE_DBCONFIG_LOOKASIDE, ...) immediately after it  
is opened.  With the above, usually a 100K or so is enough heap,  
though more might be required if you are holding many prepared  
statements or if you are using unusually big prepared statements.

Oops.  I'm late for meeting.  More to follow later tonight.....

D. Richard Hipp
d...@hwaci.com



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to