Thanks Clemens.

Gperftool a malloc replacement, profiler and leak checker, reports that the 
largest amount of memory was being used by sqlite3_memory_used api which sounds 
weird, as it just reports the value of some counters. So it might be an error 
in gperftools itself. Not sure. 

I found that throughout the value of sqlite3_memory_used is always roughly 
around 68MB and still free -lm shows high memory getting exhausted when my 
application runs. 

I guess my question is will the memory used by sqlite keep on increasing, if we 
don't finalize at all during the life time of the db, as we do more 
insert/delete/replace operations ?

-Mayank

-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Clemens Ladisch
Sent: Friday, October 03, 2014 1:40 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] why does gperftools shows sqlite3_memory_used as using 
the largest amount of memory

Mayank Kumar (mayankum) wrote:
> -my application sqlite based runs for months before it might get 
> restarted -while its running there are places we need to execute the 
> following series :-
>       - sqlite3_bind_int64(deleteStmt
>       - sqlite3_step(deleteStmt)
>       - sqlite3_reset(deleteStmt);
>
> -note that the prepare and finalize on these happens only once at the time of 
> process start and exit respectively.
>
> Do you  think this can result in uncontrolled use of memory by sqlite in our 
> application ?

No; this is perfectly fine.


But why do you think that the large amount of sqlite3_memory_used is a problem?
SQLite _uses_ memory for caching; that memory is not leaked.


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

Reply via email to