/freebsd/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_setrlimit.c | 99 if (res.rlim_cur == RLIM_INFINITY || res.rlim_cur == 0) in ATF_TC_BODY() 102 if (res.rlim_cur == res.rlim_max) /* An unprivileged run. */ in ATF_TC_BODY() 105 buf[i] = res.rlim_cur; in ATF_TC_BODY() 106 res.rlim_cur = res.rlim_cur - 1; in ATF_TC_BODY() 125 res.rlim_cur = buf[i]; in ATF_TC_BODY() 202 res.rlim_cur = 2; in ATF_TC_BODY() 292 res.rlim_cur = 0; in ATF_TC_BODY() 334 res.rlim_cur = 0; in ATF_TC_BODY() 387 res.rlim_cur = lim; in ATF_TC_BODY() 450 res.rlim_cur = 0; in ATF_TC_BODY() [all …]
|
/freebsd/lib/libc/gen/ |
H A D | ulimit.c | 48 limit.rlim_cur /= 512; in ulimit() 49 if (limit.rlim_cur > LONG_MAX) in ulimit() 51 return ((long)limit.rlim_cur); in ulimit() 60 limit.rlim_max = limit.rlim_cur = arg * 512; in ulimit()
|
H A D | sysconf.c | 89 if (rl.rlim_cur == RLIM_INFINITY) in sysconf() 91 if (rl.rlim_cur > LONG_MAX) { in sysconf() 95 return ((long)rl.rlim_cur); in sysconf() 105 if (rl.rlim_cur == RLIM_INFINITY) in sysconf() 107 if (rl.rlim_cur > LONG_MAX) { in sysconf() 111 return ((long)rl.rlim_cur); in sysconf() 115 if (rl.rlim_cur == RLIM_INFINITY) in sysconf() 117 if (rl.rlim_cur > LONG_MAX) { in sysconf() 127 if (rl.rlim_cur > SHRT_MAX) in sysconf() 130 return ((long)rl.rlim_cur); in sysconf()
|
/freebsd/tools/test/stress2/misc/ |
H A D | alternativeFlushPath.sh | 95 if (rlp.rlim_cur > MAXNOFILE) 96 rlp.rlim_cur = MAXNOFILE; 97 rlp.rlim_cur /= 10; 99 fd = malloc(rlp.rlim_cur * sizeof(int)); 101 for (i = 0, j = 0; i < rlp.rlim_cur && more == 1; i++, j++) {
|
H A D | syzkaller64.sh | 192 rlim.rlim_cur = rlim.rlim_max = 128 << 20; 194 rlim.rlim_cur = rlim.rlim_max = 8 << 20; 196 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 198 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 200 rlim.rlim_cur = rlim.rlim_max = 0; 202 rlim.rlim_cur = rlim.rlim_max = 256;
|
H A D | swap4.sh | 86 rlp.rlim_cur -= 1024 * 1024; 88 if (size > (unsigned long)rlp.rlim_cur) 89 size = rlp.rlim_cur;
|
H A D | syzkaller47.sh | 262 rlim.rlim_cur = rlim.rlim_max = 128 << 20; 264 rlim.rlim_cur = rlim.rlim_max = 8 << 20; 266 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 268 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 270 rlim.rlim_cur = rlim.rlim_max = 0; 272 rlim.rlim_cur = rlim.rlim_max = 256;
|
H A D | swap.sh | 86 rlp.rlim_cur -= 1024 * 1024; 88 if (size > (unsigned long)rlp.rlim_cur) 89 size = rlp.rlim_cur;
|
H A D | shm2.sh | 84 rlp.rlim_cur -= 1024 * 1024; 86 if (size > (unsigned long)rlp.rlim_cur) 87 size = rlp.rlim_cur;
|
H A D | syzkaller52.sh | 215 rlim.rlim_cur = rlim.rlim_max = 128 << 20; 217 rlim.rlim_cur = rlim.rlim_max = 8 << 20; 219 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 221 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 223 rlim.rlim_cur = rlim.rlim_max = 0; 225 rlim.rlim_cur = rlim.rlim_max = 256;
|
H A D | swap2.sh | 104 rlp.rlim_cur -= 1024 * 1024; 106 if (size > (unsigned long)rlp.rlim_cur) 107 size = rlp.rlim_cur;
|
/freebsd/sys/kern/ |
H A D | kern_resource.c | 553 lim.rlim_cur = olim.rlim_cur; in osetrlimit() 585 olim.rlim_cur = rl.rlim_cur > 0x7fffffff ? 0x7fffffff : rl.rlim_cur; in ogetrlimit() 667 if (limp->rlim_cur < 0) in kern_proc_setrlimit() 668 limp->rlim_cur = RLIM_INFINITY; in kern_proc_setrlimit() 672 oldssiz.rlim_cur = 0; in kern_proc_setrlimit() 677 if (limp->rlim_cur > alimp->rlim_max || in kern_proc_setrlimit() 684 if (limp->rlim_cur > limp->rlim_max) in kern_proc_setrlimit() 685 limp->rlim_cur = limp->rlim_max; in kern_proc_setrlimit() 691 if (limp->rlim_cur != RLIM_INFINITY && in kern_proc_setrlimit() 695 p->p_cpulimit = limp->rlim_cur; in kern_proc_setrlimit() [all …]
|
/freebsd/sys/compat/ia32/ |
H A D | ia32_sysvec.c | 221 if (rl->rlim_cur > ia32_maxdsiz) in ia32_fixlimit() 222 rl->rlim_cur = ia32_maxdsiz; in ia32_fixlimit() 229 if (rl->rlim_cur > ia32_maxssiz) in ia32_fixlimit() 230 rl->rlim_cur = ia32_maxssiz; in ia32_fixlimit() 237 if (rl->rlim_cur > ia32_maxvmem) in ia32_fixlimit() 238 rl->rlim_cur = ia32_maxvmem; in ia32_fixlimit()
|
/freebsd/sys/compat/linux/ |
H A D | linux_emul.c | 105 if (rlim.rlim_cur != rlim.rlim_max || in linux_set_default_openfiles() 106 rlim.rlim_cur <= linux_default_openfiles) in linux_set_default_openfiles() 108 rlim.rlim_cur = linux_default_openfiles; in linux_set_default_openfiles() 128 if (rlim.rlim_cur != rlim.rlim_max || in linux_set_default_stacksize() 129 rlim.rlim_cur <= linux_default_stacksize) in linux_set_default_stacksize() 131 rlim.rlim_cur = linux_default_stacksize; in linux_set_default_stacksize()
|
/freebsd/usr.bin/limits/ |
H A D | limits.c | 402 …[rcswhich].func(lc, resources[rcswhich].cap, limits[rcswhich].rlim_cur, limits[rcswhich].rlim_cur); in main() 403 limits[rcswhich].rlim_cur = resources[rcswhich].func(lc, str, val, val); in main() 425 if (limits[rcswhich].rlim_cur == RLIM_INFINITY) { in main() 428 } else if (limits[rcswhich].rlim_cur > limits[rcswhich].rlim_max) { in main() 430 limits[rcswhich].rlim_max = limits[rcswhich].rlim_cur; in main() 433 limits[rcswhich].rlim_cur = limits[rcswhich].rlim_max; in main() 451 limits[rcswhich].rlim_cur = set_limits[rcswhich]; in main() 516 if (shellparm[shelltype].both && limits[rcswhich].rlim_cur == limits[rcswhich].rlim_max) { in main() 533 print_limit(limits[rcswhich].rlim_cur, in main()
|
/freebsd/contrib/llvm-project/clang/tools/driver/ |
H A D | cc1_main.cpp | 90 if (rlim.rlim_cur != RLIM_INFINITY && in ensureSufficientStack() 91 rlim.rlim_cur < rlim_t(DesiredStackSize)) { in ensureSufficientStack() 95 rlim.rlim_cur = DesiredStackSize; in ensureSufficientStack() 96 else if (rlim.rlim_cur == rlim.rlim_max) in ensureSufficientStack() 99 rlim.rlim_cur = rlim.rlim_max; in ensureSufficientStack() 102 rlim.rlim_cur != DesiredStackSize) in ensureSufficientStack()
|
/freebsd/usr.bin/procstat/ |
H A D | procstat_rlimit.c | 111 if (rlimit.rlim_cur == RLIM_INFINITY) in procstat_rlimit() 114 xo_emit("{e:soft_limit/%U}", rlimit.rlim_cur); in procstat_rlimit() 123 humanize_rlimit(i, rlimit.rlim_cur)); in procstat_rlimit()
|
/freebsd/sys/arm64/arm64/ |
H A D | elf32_machdep.c | 318 if (rl->rlim_cur > aarch32_maxdsiz) in elf32_fixlimit() 319 rl->rlim_cur = aarch32_maxdsiz; in elf32_fixlimit() 326 if (rl->rlim_cur > aarch32_maxssiz) in elf32_fixlimit() 327 rl->rlim_cur = aarch32_maxssiz; in elf32_fixlimit() 334 if (rl->rlim_cur > aarch32_maxvmem) in elf32_fixlimit() 335 rl->rlim_cur = aarch32_maxvmem; in elf32_fixlimit()
|
/freebsd/contrib/netbsd-tests/lib/libc/stdio/ |
H A D | t_printf.c | 148 rl.rlim_cur = rl.rlim_max = 32 * 1024 * 1024; in ATF_TC_BODY() 150 rl.rlim_cur = rl.rlim_max = 32 * 1024 * 1024; in ATF_TC_BODY() 153 rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; in ATF_TC_BODY() 155 rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; in ATF_TC_BODY()
|
/freebsd/bin/pax/ |
H A D | pax.c | 349 reslimit.rlim_cur = reslimit.rlim_max; in gen_init() 358 reslimit.rlim_cur = reslimit.rlim_max; in gen_init() 366 reslimit.rlim_cur = reslimit.rlim_max; in gen_init() 374 reslimit.rlim_cur = reslimit.rlim_max; in gen_init()
|
/freebsd/tools/regression/priv/ |
H A D | priv_proc_setrlimit.c | 69 rl_lowered.rlim_cur -= 20; in priv_proc_setrlimit_setup() 118 rl.rlim_cur = rl.rlim_max; in priv_proc_setrlimit_raisecur_nopriv() 145 rl.rlim_cur = rl.rlim_max + 10; in priv_proc_setrlimit_raisecur()
|
/freebsd/contrib/unbound/daemon/ |
H A D | unbound.c | 217 if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY && in checkrlimits() 218 rlim.rlim_cur < (rlim_t)memsize_expect) { in checkrlimits() 219 …ted memory usage (added size of caches). %u < %u bytes", (unsigned)rlim.rlim_cur, (unsigned)memsiz… in checkrlimits() 224 if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY && in checkrlimits() 225 rlim.rlim_cur < (rlim_t)memsize_expect) { in checkrlimits() 226 …ted memory usage (added size of caches). %u < %u bytes", (unsigned)rlim.rlim_cur, (unsigned)memsiz… in checkrlimits() 263 if(rlim.rlim_cur == (rlim_t)RLIM_INFINITY) in checkrlimits() 265 if((size_t)rlim.rlim_cur < total) { in checkrlimits() 266 avail = (size_t)rlim.rlim_cur; in checkrlimits() 267 rlim.rlim_cur = (rlim_t)(total + 10); in checkrlimits()
|
/freebsd/tools/test/stress2/testcases/swap/ |
H A D | swap.c | 106 rlp.rlim_cur -= 1024 * 1024; in setup() 108 if (size > rlp.rlim_cur) in setup() 109 size = rlp.rlim_cur; in setup()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/libzfs/ |
H A D | many_fds.c | 40 .rlim_cur = 64 * 1024, in main() 49 for (int i = 0; i < limit.rlim_cur / 2; ++i) in main()
|
/freebsd/tests/sys/file/ |
H A D | dup_test.c | 184 if ((fd2 = dup2(fd1, rlp.rlim_cur + 1)) >= 0) in main() 242 if ((fd2 = fcntl(fd1, F_DUP2FD, rlp.rlim_cur + 1)) >= 0) in main() 301 if ((fd2 = fcntl(fd1, F_DUP2FD_CLOEXEC, rlp.rlim_cur + 1)) >= 0) in main() 376 if ((fd2 = dup3(fd1, rlp.rlim_cur + 1, O_CLOEXEC)) >= 0) in main()
|