"Shawn Wilsher" <[EMAIL PROTECTED]> wrote:
> Hey all,
> 
> Over in Mozilla land, we are looking for ways to free up as much
> memory as possible on demand.  That got me looking into
> sqlite3_release_memory.  However, the docs say that it tries to free
> up to N bytes, but that it could free more or less.  My question is,
> how do we get it to free as much as possible, or does it do that
> automatically regardless of the value you provide to it?
> 

To release as much memory as possible, just call

   sqlite3_release_memory(0x7fffffff);

Or, if you think you might have more than 2GiB of
memory in use:

   while( sqlite3_release_memory(0x7fffffff)>0 ){}

Please note, however, that sqlite3_release_memory() is
a no-op unless you compile with -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1.
--
D. Richard Hipp <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to