/third_party/ltp/testcases/kernel/syscalls/mincore/ |
H A D | mincore03.c | 23 bool mlock; member 54 if (tc->mlock) in test_mincore() 71 if (tc->mlock) in test_mincore()
|
H A D | mincore02.c | 95 if (mlock(addr, size) == -1) in setup()
|
/third_party/ltp/testcases/kernel/syscalls/mlock/ |
H A D | mlock02.c | 13 * 1) mlock(2) fails with ENOMEM if some of the specified address range 17 * 2) mlock(2) fails with ENOMEM if the caller had a non-zero RLIMIT_MEMLOCK 22 * 3) mlock(2) fails with EPERM if the caller was not privileged (CAP_IPC_LOCK) 43 TST_EXP_FAIL(mlock(addr, len), ENOMEM, "mlock(%p, %lu)", addr, len); in test_enomem1() 57 TST_EXP_FAIL(mlock(addr, len), ENOMEM, "mlock(%p, %lu)", addr, len); in test_enomem2() 74 TST_EXP_FAIL(mlock(addr, len), EPERM, "mlock(%p, %lu)", addr, len); in test_eperm()
|
H A D | mlock04.c | 12 * [PATCH] mlock: revert the optimization for dirtying pages and triggering writeback. 15 * "In 5ecfda0, we do some optimization in mlock, but it causes 16 * a very basic test case(attached below) of mlock to fail. So 21 * commit fdf4c587a7 ("mlock: operate on any regions with protection != PROT_NONE") 24 * PROT_READ, so attempt to not unnecessarity break COW during mlock ended up 25 * causing mlock to fail with a permission problem on unfixed kernel. 42 TST_EXP_PASS(mlock(buf, file_len), "mlock(%p, %d)", buf, file_len); in verify_mlock()
|
H A D | mlock01.c | 12 * Test mlock with various valid addresses and lengths. 24 {"mlock 1 byte", 1}, 25 {"mlock 1024 bytes", 1024}, 26 {"mlock 1024 * 1024 bytes", 1024 * 1024}, 27 {"mlock 1024 * 1024 * 10 bytes", 1024 * 1024 * 10} 36 TST_EXP_PASS(mlock(addr, tc->len), "mlock(%p, %d)", addr, tc->len); in do_mlock()
|
H A D | mlock03.c | 11 * Stack size mapping is decreased through mlock/munlock call. 16 * mapping through several loops of mlock/munlock of /proc/self/maps. 58 tst_res(TINFO, "mlock [%lx,%lx]", from, to); in verify_mlock() 59 if (mlock((const void *)from, to - from) == -1) in verify_mlock() 60 tst_res(TINFO | TERRNO, "mlock failed"); in verify_mlock()
|
/third_party/rust/crates/rustix/src/mm/ |
H A D | mmap.rs | 159 /// `mlock(ptr, len)`—Lock memory into RAM. 176 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mlock.html 177 /// [Linux]: https://man7.org/linux/man-pages/man2/mlock.2.html 179 pub unsafe fn mlock(ptr: *mut c_void, len: usize) -> io::Result<()> { in mlock() functions 180 backend::mm::syscalls::mlock(ptr, len) in mlock() 186 /// `mlock_with` is the same as [`mlock`] but adds an additional flags operand. 215 /// memory which the caller owns, to avoid compromising the `mlock` invariants
|
H A D | mod.rs | 13 mlock, mmap, mmap_anonymous, mprotect, munlock, munmap, MapFlags, MprotectFlags, ProtFlags,
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/ |
H A D | 11-1-buildonly.c | 11 * int mlock(const void *, size_t) 24 dummyvar = mlock; in dummyfcn()
|
/third_party/musl/porting/liteos_a/user/src/mman/ |
H A D | mlock.c | 5 int mlock(const void *addr, size_t len) in mlock() function
|
/third_party/musl/src/linux/ |
H A D | mlock2.c | 8 return mlock(addr, len); in mlock2()
|
/third_party/musl/src/mman/ |
H A D | mlock.c | 5 int mlock(const void *addr, size_t len) in mlock() function
|
/third_party/rust/crates/rustix/tests/mm/ |
H A D | main.rs | 9 mod mlock; modules
|
H A D | mmap.rs | 97 use rustix::mm::{mlock, mmap_anonymous, munlock, munmap, MapFlags, ProtFlags}; in test_mlock() 105 mlock(addr, 8192).unwrap(); in test_mlock()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlock/ |
H A D | 5-1.c | 10 * Test that mlock return a value of zero upon successful completion. 32 result = mlock(ptr, BUFSIZE); in main() 37 printf("mlock did not return a value of zero\n"); in main()
|
H A D | 10-1.c | 10 * Test that mlock() set errno = EINVAL when addr is not a multiple of 42 result = mlock(notpage_ptr, page_size - 1); in main() 46 ("mlock() does not require that addr be a multiple of {PAGESIZE}.\nTest PASSED\n"); in main() 50 ("mlock() requires that addr be a multiple of {PAGESIZE}.\nTest PASSED\n"); in main() 57 printf("mlock() returns a value of %i instead of 0 or 1.\n", in main() 59 perror("mlock"); in main()
|
H A D | 8-1.c | 10 * Test that the mlock() function sets errno = ENOMEM if some or all of the 47 result = mlock(page_ptr, BUFSIZE); in main()
|
H A D | 12-1.c | 10 * Test that the mlock() function sets errno = EPERM if the calling process 48 * mlock() in set_nonroot() 93 result = mlock(ptr, BUFSIZE); in main() 99 printf("You have the right to call mlock\n"); in main()
|
/third_party/musl/libc-test/src/functionalext/supplement/mman/ |
H A D | mlock.c | 35 int result = mlock(memory, memsize); in mlock_0100()
|
H A D | munlock.c | 36 int ret = mlock(memory, TEST_SIZE); in munlock_0100()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/munlock/ |
H A D | 7-1.c | 32 if (mlock(ptr, BUFSIZE) != 0) { in main() 37 perror("An error occurs when calling mlock()"); in main() 47 printf("mlock did not return a value of zero\n"); in main()
|
/third_party/ltp/testcases/kernel/mem/hugetlb/hugemmap/ |
H A D | hugemmap20.c | 40 ret = mlock(p, hpage_size); in run_test() 42 tst_res(TFAIL|TERRNO, "mlock() failed (flags %s)", tc->flags_str); in run_test() 50 tst_res(TPASS, "mlock/munlock with %s hugetlb mmap", tc->flags_str); in run_test()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlock/speculative/ |
H A D | 12-1.c | 10 * Test that the mlock() function sets errno = EPERM if the calling process 49 * mlock() in set_nonroot() 94 result = mlock(ptr, BUFSIZE); in main() 100 printf("You have the right to call mlock\n"); in main()
|
/third_party/toybox/toys/pending/ |
H A D | chsh.c | 48 if (mlock(toybuf, sizeof(toybuf))) perror_exit("mlock"); in chsh_main()
|
/third_party/ltp/testcases/realtime/lib/ |
H A D | librttest.c | 115 int mlock = 0; in rt_init_long() local 181 mlock = 1; in rt_init_long() 220 if (mlock) { in rt_init_long()
|