Attempt to release sqlite memory.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4750 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
b11d5192c2
commit
2353b43514
@ -2239,6 +2239,7 @@ sqlite3* tf_ssb_acquire_db_reader_restricted(tf_ssb_t* ssb)
|
|||||||
|
|
||||||
void tf_ssb_release_db_reader(tf_ssb_t* ssb, sqlite3* db)
|
void tf_ssb_release_db_reader(tf_ssb_t* ssb, sqlite3* db)
|
||||||
{
|
{
|
||||||
|
sqlite3_db_release_memory(db);
|
||||||
uv_mutex_lock(&ssb->db_readers_lock);
|
uv_mutex_lock(&ssb->db_readers_lock);
|
||||||
ssb->db_readers = tf_resize_vec(ssb->db_readers, sizeof(sqlite3*) * (ssb->db_readers_count + 1));
|
ssb->db_readers = tf_resize_vec(ssb->db_readers, sizeof(sqlite3*) * (ssb->db_readers_count + 1));
|
||||||
ssb->db_readers[ssb->db_readers_count++] = db;
|
ssb->db_readers[ssb->db_readers_count++] = db;
|
||||||
@ -2260,6 +2261,7 @@ sqlite3* tf_ssb_acquire_db_writer(tf_ssb_t* ssb)
|
|||||||
void tf_ssb_release_db_writer(tf_ssb_t* ssb, sqlite3* db)
|
void tf_ssb_release_db_writer(tf_ssb_t* ssb, sqlite3* db)
|
||||||
{
|
{
|
||||||
assert(ssb->db_writer == NULL);
|
assert(ssb->db_writer == NULL);
|
||||||
|
sqlite3_db_release_memory(db);
|
||||||
ssb->db_writer = db;
|
ssb->db_writer = db;
|
||||||
uv_mutex_unlock(&ssb->db_writer_lock);
|
uv_mutex_unlock(&ssb->db_writer_lock);
|
||||||
tf_trace_end(ssb->trace);
|
tf_trace_end(ssb->trace);
|
||||||
|
Loading…
Reference in New Issue
Block a user