From 54da71ef5de500016c549e20a26131365668b74c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 29 Aug 2008 01:48:31 +0200 Subject: reduce needlessly large gdbm cache a bit --- src/modules/module-stream-restore.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/modules/module-stream-restore.c') diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c index 37e8b067..47f5d836 100644 --- a/src/modules/module-stream-restore.c +++ b/src/modules/module-stream-restore.c @@ -686,6 +686,7 @@ int pa__init(pa_module*m) { pa_source_output *so; uint32_t idx; pa_bool_t restore_device = TRUE, restore_volume = TRUE, restore_muted = TRUE; + int gdbm_cache_size; pa_assert(m); @@ -746,6 +747,10 @@ int pa__init(pa_module*m) { goto fail; } + /* By default the cache of gdbm is rather large, let's reduce it a bit to save memory */ + gdbm_cache_size = 10; + gdbm_setopt(u->gdbm_file, GDBM_CACHESIZE, &gdbm_cache_size, sizeof(gdbm_cache_size)); + pa_log_info("Sucessfully opened database file '%s'.", fname); pa_xfree(fname); -- cgit