Searched refs:map_ptr (Results 1 – 3 of 3) sorted by relevance
/tools/testing/selftests/vm/ |
D | ksm_tests.c | 123 void *map_ptr = mmap(ptr, map_size, PROT_WRITE, mapping, -1, 0); in allocate_memory() local 125 if (!map_ptr) { in allocate_memory() 129 memset(map_ptr, data, map_size); in allocate_memory() 130 if (mprotect(map_ptr, map_size, prot)) { in allocate_memory() 132 munmap(map_ptr, map_size); in allocate_memory() 136 return map_ptr; in allocate_memory() 244 void *map_ptr; in check_ksm_merge() local 253 map_ptr = allocate_memory(NULL, prot, mapping, '*', page_size * page_count); in check_ksm_merge() 254 if (!map_ptr) in check_ksm_merge() 257 if (ksm_merge_pages(map_ptr, page_size * page_count, start_time, timeout)) in check_ksm_merge() [all …]
|
/tools/testing/selftests/arm64/mte/ |
D | check_mmap_options.c | 62 char *ptr, *map_ptr; in check_anonymous_memory_mapping() local 70 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_anonymous_memory_mapping() 71 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) in check_anonymous_memory_mapping() 74 ptr = map_ptr + UNDERFLOW; in check_anonymous_memory_mapping() 80 munmap((void *)map_ptr, map_size); in check_anonymous_memory_mapping() 85 mte_free_memory((void *)map_ptr, map_size, mem_type, false); in check_anonymous_memory_mapping() 94 char *ptr, *map_ptr; in check_file_memory_mapping() local 106 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_file_memory_mapping() 107 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_file_memory_mapping() 111 ptr = map_ptr + UNDERFLOW; in check_file_memory_mapping() [all …]
|
D | check_child_memory.c | 108 char *ptr, *map_ptr; in check_child_file_mapping() local 119 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_child_file_mapping() 120 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_child_file_mapping() 124 ptr = map_ptr + UNDERFLOW; in check_child_file_mapping() 130 munmap((void *)map_ptr, map_size); in check_child_file_mapping() 136 munmap((void *)map_ptr, map_size); in check_child_file_mapping()
|