| /linux/tools/testing/selftests/mm/ |
| H A D | mkdirty.c | 77 munmap(mmap_mem, mmap_size); in mmap_thp_range() 103 goto munmap; in test_ptrace_write() 114 goto munmap; in test_ptrace_write() 118 munmap: in test_ptrace_write() 119 munmap(mem, pagesize); in test_ptrace_write() 144 goto munmap; in test_ptrace_write_thp() 150 goto munmap; in test_ptrace_write_thp() 154 munmap: in test_ptrace_write_thp() 155 munmap(mmap_mem, mmap_size); in test_ptrace_write_thp() 175 goto munmap; in test_page_migration() [all …]
|
| H A D | mlock2-tests.c | 187 munmap(map, 2 * page_size); in test_mlock_lock() 195 munmap(map, 2 * page_size); in test_mlock_lock() 200 munmap(map, 2 * page_size); in test_mlock_lock() 238 munmap(map, 2 * page_size); in test_mlock_onfault() 246 munmap(map, 2 * page_size); in test_mlock_onfault() 251 munmap(map, 2 * page_size); in test_mlock_onfault() 267 munmap(map, 2 * page_size); in test_lock_onfault_of_present() 274 munmap(map, 2 * page_size); in test_lock_onfault_of_present() 288 munmap(map, 2 * page_size); in test_munlockall0() 295 munmap(map, 2 * page_size); in test_munlockall0() [all …]
|
| H A D | mremap_dontunmap.c | 58 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in kernel_support_for_mremap_dontunmap() 62 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in kernel_support_for_mremap_dontunmap() 121 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple() 123 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple() 154 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_shmem() 173 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_shmem() 175 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_shmem() 220 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_fixed() 222 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_fixed() 271 BUG_ON(munmap(dest_mapping, 5 * page_size) == -1, in mremap_dontunmap_partial_mapping() [all …]
|
| H A D | cow.c | 154 if (munmap(mem, size) < 0) in child_vmsplice_memcmp_fn() 339 if (munmap(mem, size) < 0) { in do_test_vmsplice_in_parent() 786 goto munmap; in do_run_with_base_page() 797 goto munmap; in do_run_with_base_page() 802 munmap: in do_run_with_base_page() 803 munmap(mem, pagesize); in do_run_with_base_page() 852 goto munmap; in do_run_with_thp() 863 goto munmap; in do_run_with_thp() 884 goto munmap; in do_run_with_thp() 890 goto munmap; in do_run_with_thp() [all …]
|
| H A D | mremap_test.c | 118 munmap(remap_addr, size); in is_remap_region_valid() 232 munmap(src_addr, c.region_size); in get_source_mapping() 267 munmap(start + page_size, page_size); in mremap_expand_merge() 271 munmap(start, page_size); in mremap_expand_merge() 272 munmap(start + 2 * page_size, page_size); in mremap_expand_merge() 278 munmap(start, 3 * page_size); in mremap_expand_merge() 308 munmap(start + 2 * page_size, page_size); in mremap_expand_merge_offset() 312 munmap(start, 2 * page_size); in mremap_expand_merge_offset() 318 munmap(start, 3 * page_size); in mremap_expand_merge_offset() 388 if (munmap(ptr, size) == -1) in mremap_move_within_range() [all …]
|
| H A D | guard-regions.c | 289 munmap(&ptr[5 * page_size], page_size); in local_fs_has_sane_mmap() 436 ASSERT_EQ(munmap(ptr, NUM_PAGES * page_size), 0); in TEST_F() 467 ASSERT_EQ(munmap(&ptr_region[10 * page_size], 40 * page_size), 0); in TEST_F() 468 ASSERT_EQ(munmap(&ptr_region[55 * page_size], 25 * page_size), 0); in TEST_F() 565 ASSERT_EQ(munmap(ptr_region, 100 * page_size), 0); in TEST_F() 617 ASSERT_EQ(munmap(ptr_region, page_size), 0); in TEST_F() 618 ASSERT_EQ(munmap(&ptr_region[11 * page_size], 39 * page_size), 0); in TEST_F() 619 ASSERT_EQ(munmap(&ptr_region[55 * page_size], 24 * page_size), 0); in TEST_F() 620 ASSERT_EQ(munmap(&ptr_region[99 * page_size], page_size), 0); in TEST_F() 658 ASSERT_EQ(munmap(ptr1, 10 * page_size), 0); in TEST_F() [all …]
|
| H A D | hugetlb-madvise.c | 104 if (munmap(addr, huge_page_size) || in main() 105 munmap(addr + (NR_HUGE_PAGES + 1) * huge_page_size, in main() 133 (void)munmap(addr, NR_HUGE_PAGES * huge_page_size); in main() 170 (void)munmap(addr, NR_HUGE_PAGES * huge_page_size); in main() 195 (void)munmap(addr, NR_HUGE_PAGES * huge_page_size); in main() 254 (void)munmap(addr, NR_HUGE_PAGES * huge_page_size); in main() 294 (void)munmap(addr, NR_HUGE_PAGES * huge_page_size); in main() 362 (void)munmap(addr, NR_HUGE_PAGES * huge_page_size); in main() 363 (void)munmap(addr2, NR_HUGE_PAGES * huge_page_size); in main()
|
| H A D | madv_populate.c | 48 munmap(addr, pagesize); in sense_support() 69 munmap(addr, SIZE); in test_prot_read() 90 munmap(addr, SIZE); in test_prot_write() 104 ret = munmap(addr + pagesize, pagesize); in test_holes() 132 munmap(addr, SIZE); in test_holes() 182 munmap(addr, SIZE); in test_populate_read() 204 munmap(addr, SIZE); in test_populate_write() 264 munmap(addr, SIZE); in test_softdirty()
|
| H A D | ksm_tests.c | 184 munmap(map_ptr, map_size); in allocate_memory() 342 munmap(map_ptr, page_size * page_count); in check_ksm_merge() 350 munmap(map_ptr, page_size * page_count); in check_ksm_merge() 384 munmap(map_ptr, page_size * page_count); in check_ksm_unmerge() 390 munmap(map_ptr, page_size * page_count); in check_ksm_unmerge() 429 munmap(map_ptr, page_size * page_count); in check_ksm_zero_page_merge() 434 munmap(map_ptr, page_size * page_count); in check_ksm_zero_page_merge() 587 munmap(map_ptr_orig, len + HPAGE_SIZE); in ksm_merge_hugepages_time() 592 munmap(map_ptr_orig, len + HPAGE_SIZE); in ksm_merge_hugepages_time() 628 munmap(map_ptr, map_size); in ksm_merge_time() [all …]
|
| H A D | ksm_functional_tests.c | 154 munmap(map, size); in __mmap_and_merge_range() 195 munmap(map, size); in test_unmerge() 257 munmap(map, size); in test_unmerge_zero_pages() 286 munmap(map, size); in test_unmerge_discarded() 373 munmap(map, size); in test_unmerge_uffd_wp() 437 munmap(map, size); in test_child_ksm() 618 munmap(map, size); in test_prctl_unmerge() 652 munmap(map, size); in test_prot_none() 692 munmap(map, size); in test_fork_ksm_merging_page_count()
|
| H A D | soft-dirty.c | 63 munmap(map, pagesize); in test_vma_reuse() 76 munmap(map2, pagesize); in test_vma_reuse() 181 munmap(map, pagesize); in test_mprotect() 205 munmap(reserved, 4 * pagesize); in test_merge() 259 munmap(map, 2 * pagesize); in test_merge() 308 munmap(map, 2 * pagesize); in test_merge()
|
| H A D | hugepage-vmemmap.c | 114 munmap(addr, maplength); in main() 122 munmap(addr, maplength); in main() 128 if (munmap(addr, maplength)) { in main()
|
| H A D | uffd-wp-mremap.c | 57 munmap(mmap_mem, mem - mmap_mem); in mmap_aligned() 58 munmap(mem + size, mmap_mem + mmap_size - mem - size); in mmap_aligned() 116 munmap(mem, size); in alloc_one_folio() 223 munmap(addr, size); in test_one_folio() 240 munmap(mem, size); in test_one_folio()
|
| H A D | map_fixed_noreplace.c | 35 if (munmap(addr, size) != 0) in find_base_addr() 66 if (munmap((void *)addr, 5 * page_size) != 0) { in main() 194 if (munmap((void *)addr, size) != 0) { in main()
|
| H A D | virtual_address_range.c | 195 munmap((char *)(start_addr + hop), MAP_CHUNK_SIZE); in validate_complete_va_space() 251 munmap(ptr[i], MAP_CHUNK_SIZE); in main() 254 munmap(hptr[i], MAP_CHUNK_SIZE); in main()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | mmap.c | 57 munmap(tmp1, page_size); in test_mmap() 140 err = munmap(map_mmaped, map_sz); in test_mmap() 168 err = munmap(p, map_sz); in test_mmap() 183 munmap(tmp1, map_sz); in test_mmap() 209 munmap(tmp0, 4 * page_size); in test_mmap() 214 err = munmap(tmp1 + page_size, page_size); in test_mmap() 216 munmap(tmp1, 4 * page_size); in test_mmap() 224 munmap(tmp1, page_size); in test_mmap() 225 munmap(tmp1 + 2*page_size, 2 * page_size); in test_mmap() 235 munmap(tmp1, 4 * page_size); /* unmap page 1 */ in test_mmap() [all …]
|
| /linux/Documentation/userspace-api/media/dvb/ |
| H A D | dmx-munmap.rst | 4 .. _dmx-munmap: 7 DVB munmap() 13 dmx-munmap - Unmap device memory 25 .. c:function:: int munmap( void *start, size_t length ) 47 On success :c:func:`munmap()` returns 0, on failure -1 and the
|
| /linux/tools/testing/selftests/perf_events/ |
| H A D | mmap.c | 137 munmap(rb, RB_SIZE); in FIXTURE_SETUP() 144 munmap(aux, AUX_SIZE); in FIXTURE_SETUP() 145 munmap(rb, RB_SIZE); in FIXTURE_SETUP() 182 ASSERT_EQ(munmap(self->region, REGION_SIZE), 0); in FIXTURE_TEARDOWN() 210 ASSERT_EQ(munmap(tmp, size), 0); in TEST_F() 218 ASSERT_NE(munmap(self->ptr, HOLE_SIZE), 0); in TEST_F() 219 ASSERT_NE(munmap(self->ptr + HOLE_SIZE, HOLE_SIZE), 0); in TEST_F() 220 ASSERT_NE(munmap(self->ptr + size - HOLE_SIZE, HOLE_SIZE), 0); in TEST_F()
|
| /linux/Documentation/userspace-api/media/v4l/ |
| H A D | func-munmap.rst | 4 .. _func-munmap: 7 V4L2 munmap() 13 v4l2-munmap - Unmap device memory 23 .. c:function:: int munmap( void *start, size_t length ) 49 On success :c:func:`munmap()` returns 0, on failure -1 and the
|
| /linux/tools/testing/selftests/sgx/ |
| H A D | load.c | 27 munmap((void *)encl->encl_base, encl->encl_size); in encl_delete() 30 munmap(encl->bin, encl->bin_size); in encl_delete() 37 munmap(heap_seg->src, heap_seg->size); in encl_delete() 99 munmap((void *)secs->base, encl->encl_size); in encl_ioc_create() 209 munmap(ptr, PAGE_SIZE); in encl_load() 222 munmap(ptr, PAGE_SIZE); in encl_load() 332 munmap(area, encl->encl_base - (uint64_t)area); in encl_map_area() 333 munmap((void *)(encl->encl_base + encl_size), in encl_map_area()
|
| /linux/tools/testing/selftests/mincore/ |
| H A D | mincore_selftest.c | 73 munmap(addr, page_size); in TEST() 125 munmap(addr, page_size); in TEST() 173 munmap(addr, page_size); in TEST() 276 munmap(addr, FILE_SIZE); in TEST() 348 munmap(addr, FILE_SIZE); in TEST()
|
| /linux/tools/testing/selftests/namespaces/ |
| H A D | listns_efault_test.c | 62 ret = munmap((char *)map + page_size, page_size); in TEST() 184 munmap(map, page_size); in TEST() 270 ret = munmap((char *)map + page_size, page_size); in TEST() 393 munmap(map, page_size); in TEST() 421 ret = munmap((char *)map + page_size, page_size); in TEST() 527 munmap(map, page_size); in TEST()
|
| /linux/tools/testing/selftests/ring-buffer/ |
| H A D | map_test.c | 106 munmap(desc->meta, page_size); in tracefs_cpu_map() 116 munmap(desc->meta, desc->meta->meta_page_size); in tracefs_cpu_unmap() 227 munmap(data, data_len); in TEST_F() 234 munmap(data, data_len); in TEST_F() 259 munmap(data, data_len); in TEST_F()
|
| /linux/tools/testing/selftests/powerpc/mm/ |
| H A D | hugetlb_vs_thp_test.c | 28 if (munmap(addr, SIZE)) { in test_body() 57 munmap(addr, SIZE); in test_body()
|
| /linux/Documentation/translations/zh_CN/dev-tools/ |
| H A D | kcov.rst | 107 if (munmap(cover, COVER_SIZE * sizeof(unsigned long))) 108 perror("munmap"), exit(1); 209 if (munmap(cover, COVER_SIZE * sizeof(unsigned long))) 210 perror("munmap"), exit(1); 354 if (munmap(cover, COVER_SIZE * sizeof(unsigned long))) 355 perror("munmap"), exit(1);
|