Home
last modified time | relevance | path

Searched refs:mremap (Results 1 - 25 of 49) sorted by relevance

12

/third_party/rust/crates/nix/test/sys/
H A Dtest_mman.rs26 use nix::sys::mman::{mremap, MRemapFlags}; in test_mremap_grow()
49 let mem = mremap( in test_mremap_grow()
58 let mem = mremap( in test_mremap_grow()
84 use nix::sys::mman::{mremap, MRemapFlags}; in test_mremap_shrink()
106 let mem = mremap( in test_mremap_shrink()
/test/xts/acts/kernel_lite/mem_posix/src/
H A DMremapApiTest.cpp64 * @tc.name mremap function anonymous remap expand area test
79 mem = (char *)mremap(mem, len, expandSize, 0); in HWTEST_F()
106 * @tc.name mremap function anonymous remap shrink area test
121 mem = (char *)mremap(mem, len, shrinkSize, 0); in HWTEST_F()
144 * @tc.name mremap function anonymous remap and expand area to fix address test
161 mem = (char *)mremap(mem, len, expandSize, reFlag, (void *)fixAddr); in HWTEST_F()
188 * @tc.name mremap function anonymous remap and shrink area to fix address test
205 mem = (char *)mremap(mem, len, shrinkSize, reFlag, (void *)fixAddr); in HWTEST_F()
228 * @tc.name mremap function file remap expand area test
251 mem = (char *)mremap(me in HWTEST_F()
[all...]
/third_party/musl/libc-test/src/functionalext/supplement/mman/
H A Dmremap.c48 void *map_new = mremap(map, TEST_M_SIZE, TEST_M_NEW_SIZE, MREMAP_MAYMOVE); in mremap_0100()
81 void *map_new = mremap(map, TEST_M_SIZE, PTRDIFF_MAX, MREMAP_MAYMOVE); in mremap_0200()
/test/xts/hats/kernel/mmap/
H A DMmapApiTest.cpp93 * @tc.desc mremap use MREMAP_DONTUNMAP with old len == new len
101 void *newAddr = mremap(addr, PAGE_SIZE, PAGE_SIZE, MREMAP_MAYMOVE | MREMAP_FIXED | MREMAP_DONTUNMAP, fixAddr); in HWTEST_F()
117 * @tc.desc mremap use MREMAP_DONTUNMAP with MAP_SHARED
125 void *newAddr = mremap(fixAddr, PAGE_SIZE, PAGE_SIZE, MREMAP_MAYMOVE | MREMAP_FIXED | MREMAP_DONTUNMAP, addr); in HWTEST_F()
141 * @tc.desc mremap use MREMAP_DONTUNMAP with old len != new len
149 void *newAddr = mremap(addr, PAGE_SIZE, PAGE_SIZE * 2, MREMAP_MAYMOVE | MREMAP_FIXED | MREMAP_DONTUNMAP, fixAddr); in HWTEST_F()
162 * @tc.desc mremap use MREMAP_DONTUNMAP without MREMAP_MAYMOVE
168 void *newAddr = mremap(addr, PAGE_SIZE, PAGE_SIZE, MREMAP_FIXED | MREMAP_DONTUNMAP); in HWTEST_F()
179 * @tc.desc mremap use MREMAP_DONTUNMAP with MREMAP_MAYMOVE
185 void *newAddr = mremap(add in HWTEST_F()
[all...]
/third_party/ltp/testcases/kernel/syscalls/mremap/
H A Dmremap06.c12 * Bug reproducer for 7e7757876f25 ("mm/mremap: fix vm_pgoff in vma_merge() case 3")
73 buf2 = mremap(buf + page_size, page_size, page_size, in do_test()
76 tst_brk(TBROK, "mremap() failed"); in do_test()
84 buf2 = mremap(buf + mremap_size, page_size, page_size, in do_test()
87 tst_brk(TBROK, "mremap() failed"); in do_test()
90 tst_res(TPASS, "mmap/mremap work properly"); in do_test()
H A Dmremap03.c25 * mremap() fails when used to expand the existing virtual memory mapped
31 * mremap() should return -1 and set errno to EFAULT.
67 * mremap, #include <sys/mman.h> alone should do the job. But inorder
109 * using mremap() should fail as specified old in main()
113 addr = mremap(bad_addr, memsize, newsize, MREMAP_MAYMOVE); in main()
116 /* Check for the return value of mremap() */ in main()
119 "mremap returned invalid value, expected: -1"); in main()
132 tst_resm(TPASS, "mremap() Fails, 'old region not " in main()
135 tst_resm(TFAIL, "mremap() Fails, " in main()
H A Dmremap02.c25 * mremap() fails when used to expand the existing virtual memory mapped
30 * mremap() should return -1 and set errno to EINVAL.
66 * mremap, #include <sys/mman.h> alone should do the job. But inorder
107 * mremap() should fail as old virtual address is not in main()
111 addr = mremap(addr, memsize, newsize, MREMAP_MAYMOVE); in main()
114 /* Check for the return value of mremap() */ in main()
117 "mremap returned invalid value, expected: -1"); in main()
129 tst_resm(TPASS, "mremap() Failed, 'invalid argument " in main()
132 tst_resm(TFAIL, "mremap() Failed, " in main()
H A Dmremap04.c25 * mremap() fails when used to expand the existing virtual memory mapped
30 * mremap() should return -1 and set errno to ENOMEM.
68 * mremap, #include <sys/mman.h> alone should do the job. But inorder
119 * using mremap() should fail as specified in main()
124 addr = mremap(shmaddr, memsize, newsize, 0); in main()
127 /* Check for the return value of mremap() */ in main()
130 "mremap returned invalid value, expected: -1"); in main()
142 tst_resm(TPASS, "mremap() failed, " in main()
146 tst_resm(TFAIL, "mremap() failed, " in main()
H A Dmremap01.c24 * Verify that, mremap() succeeds when used to expand the existing
29 * mremap() should succeed returning the address of new virtual memory area.
69 * mremap, #include <sys/mman.h> alone should do the job. But inorder
110 * Call mremap to expand the existing mapped in main()
113 addr = mremap(addr, memsize, newsize, MREMAP_MAYMOVE); in main()
115 /* Check for the return value of mremap() */ in main()
117 tst_brkm(TFAIL | TERRNO, cleanup, "mremap failed"); in main()
138 "mremap() is correct"); in main()
/third_party/ltp/testcases/kernel/mem/hugetlb/hugemmap/
H A Dhugemmap24.c10 * Kernel has bug in mremap for some architecture. mremap() can cause
14 * This test perform mremap() with normal and hugepages around powerpc
112 r = mremap(q, page_size, 2*page_size, 0); in run_test()
114 tst_res(TINFO, "mremap(%p, %lu, %lu, 0) disallowed", in run_test()
119 tst_res(TFAIL, "mremap() moved without MREMAP_MAYMOVE!?"); in run_test()
150 r = mremap(q, hpage_size, 2*hpage_size, 0); in run_test()
152 tst_res(TINFO, "mremap(%p, %lu, %lu, 0) disallowed", in run_test()
157 tst_res(TFAIL, "mremap() moved without MREMAP_MAYMOVE!?"); in run_test()
H A Dhugemmap25.c10 * The kernel has bug for mremap() on some architecture. mremap() can
14 * This test get the normal mapping address and mremap() hugepage mapping
37 b = mremap(a, hpage_size, hpage_size, MREMAP_MAYMOVE | MREMAP_FIXED, in do_remap()
44 tst_res(TINFO|TERRNO, "mremap(MAYMOVE|FIXED) disallowed"); in do_remap()
98 tst_res(TPASS, "Successfully tested mremap hpage near normal mapping"); in run_test()
H A Dhugemmap26.c10 * Test Description: The kernel has bug for mremap() on some architecture.
11 * mremap() can cause crashes on architectures with holes in the address
14 * This test get the huge mapping address and mremap() normal mapping
38 b = mremap(a, page_size, page_size, MREMAP_MAYMOVE | MREMAP_FIXED, in do_remap()
45 tst_res(TINFO|TERRNO, "mremap(MAYMOVE|FIXED) disallowed"); in do_remap()
79 tst_res(TPASS, "Successfully tested mremap normal near hpage mapping"); in run_test()
/third_party/rust/crates/rustix/src/mm/
H A Dmmap.rs90 /// `mremap(old_address, old_size, new_size, flags)`—Resize, modify,
103 /// [Linux]: https://man7.org/linux/man-pages/man2/mremap.2.html
106 pub unsafe fn mremap( in mremap() functions
112 backend::mm::syscalls::mremap(old_address, old_size, new_size, flags) in mremap()
115 /// `mremap(old_address, old_size, new_size, MREMAP_FIXED | flags)`—Resize,
118 /// For `mremap` without moving to a specific address, see [`mremap`].
128 /// [Linux]: https://man7.org/linux/man-pages/man2/mremap.2.html
131 #[doc(alias = "mremap")]
H A Dmod.rs18 pub use mmap::{mremap, mremap_fixed, MremapFlags};
/test/xts/hats/kernel/syscalls/mem/mmap/
H A DMmapSyscallApiTest.cpp247 void* vaNew = mremap(va, size, newSize, 0); in HWTEST_F()
272 void* vaNew = mremap(va, size, newSize, 0); in HWTEST_F()
297 void* vaNew = mremap(va, size, newSize, MREMAP_MAYMOVE); in HWTEST_F()
/third_party/musl/src/mman/
H A Dmremap.c32 weak_alias(__mremap, mremap);
/third_party/musl/src/thread/
H A Dpthread_getattr_np.c20 while (mremap(p-l-PAGE_SIZE, PAGE_SIZE, 2*PAGE_SIZE, 0)==MAP_FAILED && errno==ENOMEM) in pthread_getattr_np()
/third_party/ltp/testcases/kernel/syscalls/
H A DMakefile27 mq_timedsend mq_unlink mmap mremap open openat profil ptrace quotactl \
/third_party/rust/crates/nix/src/sys/
H A Dmman.rs192 /// Options for [`mremap`].
446 /// See the `mremap(2)` [man page](https://man7.org/linux/man-pages/man2/mremap.2.html) for
449 pub unsafe fn mremap( in mremap() functions
457 let ret = libc::mremap( in mremap()
465 let ret = libc::mremap( in mremap()
/third_party/musl/src/malloc/mallocng/
H A Drealloc.c28 // use mremap if old and new size are both mmap-worthy in realloc()
34 mremap(g->mem, g->maplen*4096UL, needed, MREMAP_MAYMOVE); in realloc()
H A Dglue.h40 #define mremap __mremap macro
/third_party/ltp/testcases/kernel/mem/thp/
H A Dthp02.c9 * Test for detecting mremap bug when THP is enabled.
11 * There was a bug in mremap THP support, sometimes causing crash
48 * mremap(p, size-ps, size-ps, flag, p2);
49 * mremap(p, size-ps, size-ps, flag, p2+ps);
50 * mremap(p+ps, size-ps, size-ps, flag, p2);
51 * mremap(p+ps, size-ps, size-ps, flag, p2+ps);
68 tst_res(TINFO, "mremap (%p-%p) to (%p-%p)", in do_child()
72 ret = mremap(old_addr, remap_size, remap_size, in do_child()
75 tst_brk(TBROK | TERRNO, "mremap"); in do_child()
79 tst_brk(TBROK, "mremap bu in do_child()
[all...]
/third_party/ltp/testcases/kernel/mem/vma/
H A Dvma03.c29 * expanding mremap() can take such a non-wrapping mapping and make it
102 remap = mremap(map, pgsz, 2 * pgsz, 0); in main()
105 tst_resm(TPASS, "mremap failed as expected."); in main()
107 tst_resm(TFAIL | TERRNO, "mremap"); in main()
110 tst_resm(TFAIL, "mremap succeeded unexpectedly."); in main()
/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/musl/include/sys/
H A Dmman.h156 void *mremap (void *, size_t, size_t, int, ...);
/third_party/musl/porting/liteos_a_newlib/kernel/include/sys/
H A Dmman.h124 void *mremap (void *, size_t, size_t, int, ...);

Completed in 9 milliseconds

12