summaryrefslogtreecommitdiff
path: root/src/modules/module-device-restore.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-08-29 01:48:31 +0200
committerLennart Poettering <lennart@poettering.net>2008-08-29 01:48:31 +0200
commit54da71ef5de500016c549e20a26131365668b74c (patch)
treecacf23cda157bac8ee8762c54539ea33c268a098 /src/modules/module-device-restore.c
parent450fe170a5d8a38a9e49ddaae02ed7524e78a51f (diff)
reduce needlessly large gdbm cache a bit
Diffstat (limited to 'src/modules/module-device-restore.c')
-rw-r--r--src/modules/module-device-restore.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c
index 920b4517b..86a788104 100644
--- a/src/modules/module-device-restore.c
+++ b/src/modules/module-device-restore.c
@@ -288,6 +288,7 @@ int pa__init(pa_module*m) {
pa_source *source;
uint32_t idx;
pa_bool_t restore_volume = TRUE, restore_muted = TRUE;
+ int gdbm_cache_size;
pa_assert(m);
@@ -337,6 +338,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);