diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-06-08 20:45:32 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-06-14 20:01:45 +0200 |
commit | d8cf2ac79b524d7784bccb428295ebc9c5e8548c (patch) | |
tree | 43a03ab780ccc0b130dc57322c816f99e3f09754 /src/login/logind.c | |
parent | 799ec13412e2f6649fd69ce4f1ca1674a40039b0 (diff) |
util: introduce physical_memory_scale() to unify how we scale by physical memory
The various bits of code did the scaling all different, let's unify this,
given that the code is not trivial.
Diffstat (limited to 'src/login/logind.c')
-rw-r--r-- | src/login/logind.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/logind.c b/src/login/logind.c index caf149cfb7..d01dd110ea 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -61,7 +61,7 @@ static void manager_reset_config(Manager *m) { m->idle_action_usec = 30 * USEC_PER_MINUTE; m->idle_action = HANDLE_IGNORE; - m->runtime_dir_size = PAGE_ALIGN((size_t) (physical_memory() / 10)); /* 10% */ + m->runtime_dir_size = physical_memory_scale(10U, 100U); /* 10% */ m->user_tasks_max = 12288; m->sessions_max = 8192; m->inhibitors_max = 8192; |