Home
last modified time | relevance | path

Searched refs:rlim (Results 1 – 25 of 51) sorted by relevance

123

/freebsd/tools/test/stress2/misc/
H A Dsyzkaller64.sh191 struct rlimit rlim;
192 rlim.rlim_cur = rlim.rlim_max = 128 << 20;
193 setrlimit(RLIMIT_AS, &rlim);
194 rlim.rlim_cur = rlim.rlim_max = 8 << 20;
195 setrlimit(RLIMIT_MEMLOCK, &rlim);
196 rlim.rlim_cur = rlim.rlim_max = 1 << 20;
197 setrlimit(RLIMIT_FSIZE, &rlim);
198 rlim.rlim_cur = rlim.rlim_max = 1 << 20;
199 setrlimit(RLIMIT_STACK, &rlim);
200 rlim.rlim_cur = rlim.rlim_max = 0;
[all …]
H A Dsyzkaller47.sh261 struct rlimit rlim;
262 rlim.rlim_cur = rlim.rlim_max = 128 << 20;
263 setrlimit(RLIMIT_AS, &rlim);
264 rlim.rlim_cur = rlim.rlim_max = 8 << 20;
265 setrlimit(RLIMIT_MEMLOCK, &rlim);
266 rlim.rlim_cur = rlim.rlim_max = 1 << 20;
267 setrlimit(RLIMIT_FSIZE, &rlim);
268 rlim.rlim_cur = rlim.rlim_max = 1 << 20;
269 setrlimit(RLIMIT_STACK, &rlim);
270 rlim.rlim_cur = rlim.rlim_max = 0;
[all …]
H A Dsyzkaller52.sh214 struct rlimit rlim;
215 rlim.rlim_cur = rlim.rlim_max = 128 << 20;
216 setrlimit(RLIMIT_AS, &rlim);
217 rlim.rlim_cur = rlim.rlim_max = 8 << 20;
218 setrlimit(RLIMIT_MEMLOCK, &rlim);
219 rlim.rlim_cur = rlim.rlim_max = 1 << 20;
220 setrlimit(RLIMIT_FSIZE, &rlim);
221 rlim.rlim_cur = rlim.rlim_max = 1 << 20;
222 setrlimit(RLIMIT_STACK, &rlim);
223 rlim.rlim_cur = rlim.rlim_max = 0;
[all …]
H A Dsyzkaller25.sh274 struct rlimit rlim;
275 rlim.rlim_cur = rlim.rlim_max = 128 << 20;
276 setrlimit(RLIMIT_AS, &rlim);
277 rlim.rlim_cur = rlim.rlim_max = 8 << 20;
278 setrlimit(RLIMIT_MEMLOCK, &rlim);
279 rlim.rlim_cur = rlim.rlim_max = 1 << 20;
280 setrlimit(RLIMIT_FSIZE, &rlim);
281 rlim.rlim_cur = rlim.rlim_max = 1 << 20;
282 setrlimit(RLIMIT_STACK, &rlim);
283 rlim.rlim_cur = rlim.rlim_max = 0;
[all …]
H A Dsyzkaller69.sh306 struct rlimit rlim;
307 rlim.rlim_cur = rlim.rlim_max = 128 << 20;
308 setrlimit(RLIMIT_AS, &rlim);
309 rlim.rlim_cur = rlim.rlim_max = 8 << 20;
310 setrlimit(RLIMIT_MEMLOCK, &rlim);
311 rlim.rlim_cur = rlim.rlim_max = 1 << 20;
312 setrlimit(RLIMIT_FSIZE, &rlim);
313 rlim.rlim_cur = rlim.rlim_max = 1 << 20;
314 setrlimit(RLIMIT_STACK, &rlim);
315 rlim.rlim_cur = rlim.rlim_max = 0;
[all …]
H A Dsetrlimit2.sh69 struct rlimit rlim;
95 rlim.rlim_cur = rlim.rlim_max = len / 2;;
96 if (setrlimit(RLIMIT_FSIZE, &rlim) == -1)
H A Dsetrlimit.sh73 struct rlimit rlim;
90 rlim.rlim_cur = rlim.rlim_max = limit;
91 if (setrlimit(RLIMIT_FSIZE, &rlim) == -1)
/freebsd/sys/compat/linux/
H A Dlinux_emul.c96 struct rlimit rlim; in linux_set_default_openfiles() local
103 lim_rlimit_proc(p, RLIMIT_NOFILE, &rlim); in linux_set_default_openfiles()
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()
109 error = kern_proc_setrlimit(td, p, RLIMIT_NOFILE, &rlim); in linux_set_default_openfiles()
119 struct rlimit rlim; in linux_set_default_stacksize() local
126 lim_rlimit_proc(p, RLIMIT_STACK, &rlim); in linux_set_default_stacksize()
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()
[all …]
H A Dlinux_misc.c1129 linux_get_dummy_limit(struct thread *td, l_uint resource, struct rlimit *rlim) in linux_get_dummy_limit() argument
1140 rlim->rlim_cur = LINUX_RLIM_INFINITY; in linux_get_dummy_limit()
1141 rlim->rlim_max = LINUX_RLIM_INFINITY; in linux_get_dummy_limit()
1145 rlim->rlim_cur = 0; in linux_get_dummy_limit()
1146 rlim->rlim_max = 0; in linux_get_dummy_limit()
1154 rlim->rlim_cur = res; in linux_get_dummy_limit()
1155 rlim->rlim_max = res; in linux_get_dummy_limit()
1162 rlim->rlim_cur = res; in linux_get_dummy_limit()
1163 rlim->rlim_max = res; in linux_get_dummy_limit()
1174 struct l_rlimit rlim; in linux_setrlimit() local
[all …]
/freebsd/contrib/llvm-project/clang/tools/driver/
H A Dcc1_main.cpp84 struct rlimit rlim; in ensureSufficientStack() local
85 if (getrlimit(RLIMIT_STACK, &rlim) != 0) in ensureSufficientStack()
90 if (rlim.rlim_cur != RLIM_INFINITY && in ensureSufficientStack()
91 rlim.rlim_cur < rlim_t(DesiredStackSize)) { in ensureSufficientStack()
93 if (rlim.rlim_max == RLIM_INFINITY || in ensureSufficientStack()
94 rlim.rlim_max >= 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()
101 if (setrlimit(RLIMIT_STACK, &rlim) != 0 || in ensureSufficientStack()
[all …]
/freebsd/usr.sbin/rpc.yppasswdd/
H A Dyppasswdd_main.c162 struct rlimit rlim; in main() local
327 rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY; in main()
328 (void)setrlimit(RLIMIT_CPU, &rlim); in main()
329 (void)setrlimit(RLIMIT_FSIZE, &rlim); in main()
330 (void)setrlimit(RLIMIT_STACK, &rlim); in main()
331 (void)setrlimit(RLIMIT_DATA, &rlim); in main()
332 (void)setrlimit(RLIMIT_RSS, &rlim); in main()
335 rlim.rlim_cur = rlim.rlim_max = 0; in main()
336 (void)setrlimit(RLIMIT_CORE, &rlim); in main()
/freebsd/contrib/ntp/sntp/libevent/
H A Dbufferevent_ratelim.c565 struct bufferevent_rate_limit *rlim; in bufferevent_set_rate_limit() local
575 rlim = bevp->rate_limiting; in bufferevent_set_rate_limit()
576 rlim->cfg = NULL; in bufferevent_set_rate_limit()
579 if (event_initialized(&rlim->refill_bucket_event)) in bufferevent_set_rate_limit()
580 event_del(&rlim->refill_bucket_event); in bufferevent_set_rate_limit()
595 rlim = mm_calloc(1, sizeof(struct bufferevent_rate_limit)); in bufferevent_set_rate_limit()
596 if (!rlim) in bufferevent_set_rate_limit()
598 bevp->rate_limiting = rlim; in bufferevent_set_rate_limit()
600 rlim = bevp->rate_limiting; in bufferevent_set_rate_limit()
602 reinit = rlim->cfg != NULL; in bufferevent_set_rate_limit()
[all …]
/freebsd/contrib/libevent/
H A Dbufferevent_ratelim.c565 struct bufferevent_rate_limit *rlim; in bufferevent_set_rate_limit() local
575 rlim = bevp->rate_limiting; in bufferevent_set_rate_limit()
576 rlim->cfg = NULL; in bufferevent_set_rate_limit()
579 if (event_initialized(&rlim->refill_bucket_event)) in bufferevent_set_rate_limit()
580 event_del(&rlim->refill_bucket_event); in bufferevent_set_rate_limit()
595 rlim = mm_calloc(1, sizeof(struct bufferevent_rate_limit)); in bufferevent_set_rate_limit()
596 if (!rlim) in bufferevent_set_rate_limit()
598 bevp->rate_limiting = rlim; in bufferevent_set_rate_limit()
600 rlim = bevp->rate_limiting; in bufferevent_set_rate_limit()
602 reinit = rlim->cfg != NULL; in bufferevent_set_rate_limit()
[all …]
/freebsd/contrib/unbound/daemon/
H A Dunbound.c199 struct rlimit rlim; in checkrlimits() local
216 if(getrlimit(RLIMIT_AS, &rlim) == 0) { in checkrlimits()
217 if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY && in checkrlimits()
218 rlim.rlim_cur < (rlim_t)memsize_expect) { in checkrlimits()
219 …e expected memory usage (added size of caches). %u < %u bytes", (unsigned)rlim.rlim_cur, (unsigned… in checkrlimits()
223 if(getrlimit(RLIMIT_DATA, &rlim) == 0) { in checkrlimits()
224 if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY && in checkrlimits()
225 rlim.rlim_cur < (rlim_t)memsize_expect) { in checkrlimits()
226 …e expected memory usage (added size of caches). %u < %u bytes", (unsigned)rlim.rlim_cur, (unsigned… in checkrlimits()
259 if(getrlimit(RLIMIT_NOFILE, &rlim) < 0) { in checkrlimits()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_posix_libcdep.cpp87 rlimit rlim; in getlim() local
88 CHECK_EQ(0, getrlimit(res, &rlim)); in getlim()
89 return rlim.rlim_cur; in getlim()
93 struct rlimit rlim; in setlim() local
94 if (getrlimit(res, &rlim)) { in setlim()
98 rlim.rlim_cur = lim; in setlim()
99 if (setrlimit(res, &rlim)) { in setlim()
107 rlimit rlim; in DisableCoreDumperIfNecessary() local
108 CHECK_EQ(0, getrlimit(RLIMIT_CORE, &rlim)); in DisableCoreDumperIfNecessary()
126 rlim.rlim_cur = Min<rlim_t>(SANITIZER_LINUX ? 1 : 0, rlim.rlim_max); in DisableCoreDumperIfNecessary()
[all …]
/freebsd/contrib/netbsd-tests/lib/libpthread/
H A Dt_siglongjmp.c77 struct rlimit rlim; in ATF_TC_BODY() local
80 rlim.rlim_cur = rlim.rlim_max = 0; in ATF_TC_BODY()
81 (void)setrlimit(RLIMIT_CORE, &rlim); in ATF_TC_BODY()
H A Dt_sigmask.c70 struct rlimit rlim; in ATF_TC_BODY() local
72 rlim.rlim_cur = rlim.rlim_max = 0; in ATF_TC_BODY()
73 (void) setrlimit(RLIMIT_CORE, &rlim); in ATF_TC_BODY()
/freebsd/lib/libutil/
H A Dpw_util.c91 struct rlimit rlim; in pw_init()
130 rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY; in pw_init()
131 (void)setrlimit(RLIMIT_CPU, &rlim); in pw_init()
132 (void)setrlimit(RLIMIT_FSIZE, &rlim); in pw_init()
133 (void)setrlimit(RLIMIT_STACK, &rlim); in pw_init()
134 (void)setrlimit(RLIMIT_DATA, &rlim); in pw_init()
135 (void)setrlimit(RLIMIT_RSS, &rlim); in pw_init()
138 rlim.rlim_cur = rlim.rlim_max = 0; in pw_init()
139 (void)setrlimit(RLIMIT_CORE, &rlim); in pw_init()
H A Dlogin_class.c82 struct rlimit rlim; in setclassresources() local
96 if (getrlimit(lr->why, &rlim) != 0) in setclassresources()
101 rlim_t rcur = rlim.rlim_cur; in setclassresources()
102 rlim_t rmax = rlim.rlim_max; in setclassresources()
109 rlim.rlim_cur = (*lr->who)(lc, name_cur, rcur, rcur); in setclassresources()
110 rlim.rlim_max = (*lr->who)(lc, name_max, rmax, rmax); in setclassresources()
112 if (setrlimit(lr->why, &rlim) == -1) in setclassresources()
/freebsd/contrib/netbsd-tests/lib/libc/sys/
H A Dt_mincore.c153 struct rlimit rlim; in ATF_TC_BODY() local
155 ATF_REQUIRE(getrlimit(RLIMIT_MEMLOCK, &rlim) == 0); in ATF_TC_BODY()
160 rlim.rlim_max = RLIM_INFINITY; in ATF_TC_BODY()
161 rlim.rlim_cur = rlim.rlim_max; in ATF_TC_BODY()
162 ATF_REQUIRE(setrlimit(RLIMIT_MEMLOCK, &rlim) == 0); in ATF_TC_BODY()
/freebsd/lib/libc/gen/
H A Delf_utils.c78 struct rlimit rlim; in __libc_map_stacks_exec() local
90 if (getrlimit(RLIMIT_STACK, &rlim) == -1) in __libc_map_stacks_exec()
92 stacksz = rlim.rlim_cur; in __libc_map_stacks_exec()
/freebsd/tests/sys/vm/
H A Dmlock_test.c183 struct rlimit rlim; in ATF_TC_BODY() local
196 error = getrlimit(RLIMIT_MEMLOCK, &rlim); in ATF_TC_BODY()
198 rlim.rlim_cur += len; in ATF_TC_BODY()
199 rlim.rlim_max += len; in ATF_TC_BODY()
200 error = setrlimit(RLIMIT_MEMLOCK, &rlim); in ATF_TC_BODY()
/freebsd/contrib/ofed/libibverbs/
H A Dinit.c247 struct rlimit rlim; in check_memlock_limit() local
252 if (getrlimit(RLIMIT_MEMLOCK, &rlim)) { in check_memlock_limit()
257 if (rlim.rlim_cur <= 32768) in check_memlock_limit()
260 rlim.rlim_cur); in check_memlock_limit()
/freebsd/contrib/netbsd-tests/lib/libc/gen/
H A Dt_siginfo.c179 struct rlimit rlim; in sigchild_setup() local
181 (void)getrlimit(RLIMIT_CORE, &rlim); in sigchild_setup()
182 rlim.rlim_cur = rlim.rlim_max; in sigchild_setup()
183 (void)setrlimit(RLIMIT_CORE, &rlim); in sigchild_setup()
/freebsd/contrib/netbsd-tests/fs/puffs/h_dtfs/
H A Ddtfs_vfsops.c197 struct rlimit rlim; in dtfs_fs_statvfs() local
211 if (getrlimit(RLIMIT_DATA, &rlim) == 0) in dtfs_fs_statvfs()
212 btot = rlim.rlim_cur; in dtfs_fs_statvfs()

123