Re: [sqlite] Any operation to trigger osMunmap?

2018-04-18 Thread Nick
So the PSS will not decrease even if the db becomes smaller after some
DELETE/vacuum operations? 

I think it is a better way to free the mmap memory after every query
automatically inside sqlite. Why not?



--
Sent from: http://sqlite.1065341.n5.nabble.com/
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Any operation to trigger osMunmap?

2018-04-18 Thread Richard Hipp
On 4/18/18, Nick  wrote:
> Hi,
> I have one process using sqlite with “pragma mmap_size=30M”. The operations
> of my process is insert-select-insert-select. So the PSS(private clean) will
> increase along with the growing of the db which is treated as memory leak by
> Mem-Analysor tool.
>
> I guess calling sqlite3_close() or pragma mmap_size=0 after querys may free
> the PSS but that is not a good way for my process.
>
> So I am wondering is there any other way to free the PSS? As I find
> unixUnmapfile() will be called when nFetchOut back to 0 but I do not know
> what operation may trigger that.

I think sqlite3_close() or pragma mmap_size are the only ways to do that.

Note that the PSS increase is not actually a memory leak.  That it is
reported as a leak is a issue in Mem-Analyzor.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Any operation to trigger osMunmap?

2018-04-18 Thread Nick
Hi,
I have one process using sqlite with “pragma mmap_size=30M”. The operations
of my process is insert-select-insert-select. So the PSS(private clean) will
increase along with the growing of the db which is treated as memory leak by
Mem-Analysor tool. 

I guess calling sqlite3_close() or pragma mmap_size=0 after querys may free
the PSS but that is not a good way for my process.

So I am wondering is there any other way to free the PSS? As I find
unixUnmapfile() will be called when nFetchOut back to 0 but I do not know
what operation may trigger that.

Thanks for any light you can shed.



--
Sent from: http://sqlite.1065341.n5.nabble.com/
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users