Searched refs:physical_memory_scale (Results 1 – 9 of 9) sorted by relevance
/systemd-251/src/test/ |
D | test-util.c | 171 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/ |
D | limits-util.h | 7 uint64_t physical_memory_scale(uint64_t v, uint64_t max);
|
D | limits-util.c | 81 uint64_t physical_memory_scale(uint64_t v, uint64_t max) { in physical_memory_scale() function
|
/systemd-251/src/login/ |
D | user-runtime-dir.c | 39 *size = physical_memory_scale(10U, 100U); /* 10% */ in acquire_runtime_dir_properties()
|
D | logind-core.c | 65 m->runtime_dir_size = physical_memory_scale(10U, 100U); /* 10% */ in manager_reset_config()
|
D | logind-user.c | 907 *sz = physical_memory_scale(r, 10000U); in config_parse_tmpfs_size()
|
/systemd-251/src/core/ |
D | dbus-cgroup.c | 901 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);
|
D | main.c | 1267 … mm = physical_memory_scale(1, 8); /* Let's scale how much we allow to be locked by the amount of in bump_rlimit_memlock()
|
D | load-fragment.c | 3888 bytes = physical_memory_scale(r, 10000U); in config_parse_memory_limit()
|