> So you should
see results if you start a transaction, do a few update statements, commit
the transaction, the call sqlite3_release_memory(db).

I tried this with a large table, first with no transaction then with a
transaction
and tried the sqlite3_release_memory directly after the sqlite3_finalize,
but in both cases result still zero:

sqlite3_memory_used: 37190712
sqlite3_release_memory:    0
sqlite3_memory_used: 37190712

This was a single update, where I don't think a transaction is helpful.
Still no idea how I can make sqlite3_release_memory produce non-zero.

RBS



On Thu, Jan 7, 2016 at 6:05 AM, Scott Hess <shess at google.com> wrote:

> On Wed, Jan 6, 2016 at 3:03 PM, Bart Smissaert <bart.smissaert at gmail.com>
> wrote:
>
> > Have compiled sqlite3.dll (latest) compiled with
> ENABLE_MEMORY_MANAGEMENT,
> > but sofar
> > not been able yet to make sqlite3_release_memory produce anything else
> than
> > 0.
> > What would be the simplest way to make this happen?
> > I don't want to do this with C coding, so it should be some SQL scenario
> or
> > to do with simple
> > SQLite functions such as sqlite3_step, _prepare, -finalize etc.
>
>
> Last time I was paying attention to this, I believe that I found that the
> biggest effect was to free unpinned pages from the page cache.  So it might
> not free pages if you're in a transaction, for instance.  I would guess
> that if you had memory-mapped mode on and are doing only reads, there would
> be no pages to free (mmap pages aren't in the page cache).  So you should
> see results if you start a transaction, do a few update statements, commit
> the transaction, the call sqlite3_release_memory(db).
>
> -scott
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to