On Fri, Mar 21, 2008 at 10:41:10AM -0400, Rob Richardson wrote:
> My SQLite library is built from the single translation unit
> sqlite.c/sqlite.h.  That file contains the version number 3.3.17.
> 
> I do not have valgrind, but circumstantial evidence that this is a
> SQLite problem is strong.  When stepping through my code, I see that
> my application's memory jumps by over 2.5 megabytes when the
> sqlite3_step() method is called when using either the sorted query or
> the query using max().  The unsorted query doesn't show any memory
> jump.  Also, the difference in memory consumption before this part of
> the code is executed and after it is left is the same size as the jump
> in memory when sqlite3_step() is called.


When doing a sorted query, the result set is formed in a temporary database
somewhere defined by the environment. In your case, it sounds like the 
temporary database is memory based. Once the result set is done with, SQLite
may return the memory to the OS using free, but that will show under the
process's virtual memory footprint.

You can tell SQLite to use a disk based temporary database using:
http://sqlite.org/pragma.html#pragma_temp_store

Using this, your memory usage will probably be more stable.

However, this certainly isn't a memory leak.


> 
> RobR
> 

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

Reply via email to