summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-30 17:04:40 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-30 17:04:40 +0800
commit6e8189ed25ad5beb1c5ad390af988403f0b4402a (patch)
treeed67b73b319eeed9c77869c1657e634463264817
parent3f1592a6c2ac1989d56614bdb0eecc6815a7867b (diff)
downloadpttbbs-6e8189ed25ad5beb1c5ad390af988403f0b4402a.tar
pttbbs-6e8189ed25ad5beb1c5ad390af988403f0b4402a.tar.gz
pttbbs-6e8189ed25ad5beb1c5ad390af988403f0b4402a.tar.bz2
pttbbs-6e8189ed25ad5beb1c5ad390af988403f0b4402a.tar.lz
pttbbs-6e8189ed25ad5beb1c5ad390af988403f0b4402a.tar.xz
pttbbs-6e8189ed25ad5beb1c5ad390af988403f0b4402a.tar.zst
pttbbs-6e8189ed25ad5beb1c5ad390af988403f0b4402a.zip
-- emaildb: release runtime cache resource to reduce memory after emaildb being loaded/released
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3886 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/emaildb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mbbsd/emaildb.c b/mbbsd/emaildb.c
index aa7101d2..d8f0ae05 100644
--- a/mbbsd/emaildb.c
+++ b/mbbsd/emaildb.c
@@ -188,6 +188,10 @@ int main()
if (Db != NULL)
sqlite3_close(Db);
+#if defined(__GLIBC__)
+ __libc_freeres(); // discovered by wens, to reduce internal cache caused by sqlite.
+#endif
+
close(fd);
return 0;
}