Lines Matching refs:memory_limit
174 unsigned long memory_limit = get_mem_detect_end(); in get_random_base() local
180 memory_limit = min(memory_limit, memory_end); in get_random_base()
198 memory_limit = get_mem_detect_end(); in get_random_base()
199 if (memory_end_set && memory_limit > memory_end) in get_random_base()
200 memory_limit = memory_end; in get_random_base()
203 kasan_needs = memory_limit / 8; in get_random_base()
205 kasan_needs += (memory_limit + kasan_needs) / PAGE_SIZE / in get_random_base()
207 memory_limit -= kasan_needs; in get_random_base()
211 if (safe_addr + kernel_size > memory_limit) in get_random_base()
214 max_pos = count_valid_kernel_positions(kernel_size, safe_addr, memory_limit); in get_random_base()
223 return position_to_address(base_pos + 1, kernel_size, safe_addr, memory_limit); in get_random_base()