Home
last modified time | relevance | path

Searched refs:physical_memory_scale (Results 1 – 9 of 9) sorted by relevance

/systemd-251/src/test/
Dtest-util.c171 TEST(physical_memory_scale) { in TEST() argument
176 assert_se(physical_memory_scale(0, 100) == 0); in TEST()
177 assert_se(physical_memory_scale(100, 100) == p); in TEST()
180 log_info("Memory scaled by 50%%: %" PRIu64, physical_memory_scale(50, 100)); in TEST()
185 assert_se(page_size()/2 + physical_memory_scale(50, 100) - p/2 <= page_size()); in TEST()
186 assert_se(physical_memory_scale(200, 100) == p*2); in TEST()
188 assert_se(physical_memory_scale(0, 1) == 0); in TEST()
189 assert_se(physical_memory_scale(1, 1) == p); in TEST()
190 assert_se(physical_memory_scale(2, 1) == p*2); in TEST()
192 assert_se(physical_memory_scale(0, 2) == 0); in TEST()
[all …]
/systemd-251/src/basic/
Dlimits-util.h7 uint64_t physical_memory_scale(uint64_t v, uint64_t max);
Dlimits-util.c81 uint64_t physical_memory_scale(uint64_t v, uint64_t max) { in physical_memory_scale() function
/systemd-251/src/login/
Duser-runtime-dir.c39 *size = physical_memory_scale(10U, 100U); /* 10% */ in acquire_runtime_dir_properties()
Dlogind-core.c65 m->runtime_dir_size = physical_memory_scale(10U, 100U); /* 10% */ in manager_reset_config()
Dlogind-user.c907 *sz = physical_memory_scale(r, 10000U); in config_parse_tmpfs_size()
/systemd-251/src/core/
Ddbus-cgroup.c901 BUS_DEFINE_SET_CGROUP_LIMIT(memory, CGROUP_MASK_MEMORY, physical_memory_scale, 1);
902 BUS_DEFINE_SET_CGROUP_LIMIT(memory_protection, CGROUP_MASK_MEMORY, physical_memory_scale, 0);
903 BUS_DEFINE_SET_CGROUP_LIMIT(swap, CGROUP_MASK_MEMORY, physical_memory_scale, 0);
Dmain.c1267 … mm = physical_memory_scale(1, 8); /* Let's scale how much we allow to be locked by the amount of in bump_rlimit_memlock()
Dload-fragment.c3888 bytes = physical_memory_scale(r, 10000U); in config_parse_memory_limit()