diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/module-device-restore.c | 5 | ||||
-rw-r--r-- | src/modules/module-stream-restore.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c index 920b4517..86a78810 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); 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); |