Make the shared memory segment size configurable

This is useful only on systems where memory overcommit is not available
or disabled.
This commit is contained in:
Lennart Poettering 2008-10-01 01:14:36 +02:00
parent a84b72bf96
commit 79ad4e63f6
23 changed files with 99 additions and 37 deletions

View file

@ -166,6 +166,24 @@ int pa_config_parse_int(const char *filename, unsigned line, const char *lvalue,
return 0;
}
int pa_config_parse_size(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
size_t *i = data;
uint32_t k;
pa_assert(filename);
pa_assert(lvalue);
pa_assert(rvalue);
pa_assert(data);
if (pa_atou(rvalue, &k) < 0) {
pa_log("[%s:%u] Failed to parse numeric value: %s", filename, line, rvalue);
return -1;
}
*i = (size_t) k;
return 0;
}
int pa_config_parse_bool(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
int k;
pa_bool_t *b = data;