Home
last modified time | relevance | path

Searched refs:rlim_cur (Results 1 – 25 of 139) sorted by relevance

123456

/freebsd/contrib/netbsd-tests/lib/libc/sys/
H A Dt_setrlimit.c99 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 Dulimit.c48 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 Dsysconf.c89 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 DalternativeFlushPath.sh95 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 Dsyzkaller64.sh192 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 Dswap4.sh86 rlp.rlim_cur -= 1024 * 1024;
88 if (size > (unsigned long)rlp.rlim_cur)
89 size = rlp.rlim_cur;
H A Dsyzkaller47.sh262 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 Dswap.sh86 rlp.rlim_cur -= 1024 * 1024;
88 if (size > (unsigned long)rlp.rlim_cur)
89 size = rlp.rlim_cur;
H A Dshm2.sh84 rlp.rlim_cur -= 1024 * 1024;
86 if (size > (unsigned long)rlp.rlim_cur)
87 size = rlp.rlim_cur;
H A Dsyzkaller52.sh215 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 Dswap2.sh104 rlp.rlim_cur -= 1024 * 1024;
106 if (size > (unsigned long)rlp.rlim_cur)
107 size = rlp.rlim_cur;
/freebsd/sys/kern/
H A Dkern_resource.c553 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 Dia32_sysvec.c221 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 Dlinux_emul.c105 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 Dlimits.c402 …[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 Dcc1_main.cpp90 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 Dprocstat_rlimit.c111 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 Delf32_machdep.c318 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 Dt_printf.c148 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 Dpax.c349 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 Dpriv_proc_setrlimit.c69 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 Dunbound.c217 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 Dswap.c106 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 Dmany_fds.c40 .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 Ddup_test.c184 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()

123456