mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
reduce needlessly large gdbm cache a bit
This commit is contained in:
parent
450fe170a5
commit
54da71ef5d
2 changed files with 10 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue