Home
last modified time | relevance | path

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

12

/external/blktrace/btt/
Dmisc.c89 struct rlimit rlim; in increase_limit() local
92 if (!getrlimit(resource, &rlim)) { in increase_limit()
93 rlim.rlim_cur += increase; in increase_limit()
94 if (rlim.rlim_cur >= rlim.rlim_max) in increase_limit()
95 rlim.rlim_max = rlim.rlim_cur + increase; in increase_limit()
97 if (!setrlimit(resource, &rlim)) in increase_limit()
/external/compiler-rt/lib/sanitizer_common/
Dsanitizer_posix_libcdep.cc55 struct rlimit rlim; in StackSizeIsUnlimited() local
56 CHECK_EQ(0, getrlimit(RLIMIT_STACK, &rlim)); in StackSizeIsUnlimited()
57 return ((uptr)rlim.rlim_cur == (uptr)-1); in StackSizeIsUnlimited()
61 struct rlimit rlim; in SetStackSizeLimitInBytes() local
62 rlim.rlim_cur = limit; in SetStackSizeLimitInBytes()
63 rlim.rlim_max = limit; in SetStackSizeLimitInBytes()
64 if (setrlimit(RLIMIT_STACK, &rlim)) { in SetStackSizeLimitInBytes()
Dsanitizer_common_syscalls.inc2019 PRE_SYSCALL(getrlimit)(long resource, void *rlim) {}
2021 POST_SYSCALL(getrlimit)(long res, long resource, void *rlim) {
2023 if (rlim) POST_WRITE(rlim, struct_rlimit_sz);
2027 PRE_SYSCALL(old_getrlimit)(long resource, void *rlim) {}
2029 POST_SYSCALL(old_getrlimit)(long res, long resource, void *rlim) {
2031 if (rlim) POST_WRITE(rlim, struct_rlimit_sz);
2035 PRE_SYSCALL(setrlimit)(long resource, void *rlim) {}
2037 POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) {
2039 if (rlim) POST_WRITE(rlim, struct_rlimit_sz);
/external/libunwind/tests/
Dtest-mem.c89 struct rlimit rlim; in main() local
96 rlim.rlim_cur = 0; in main()
97 rlim.rlim_max = RLIM_INFINITY; in main()
98 setrlimit (RLIMIT_DATA, &rlim); in main()
99 setrlimit (RLIMIT_AS, &rlim); in main()
DGperf-simple.c235 struct rlimit rlim; in main() local
237 rlim.rlim_cur = RLIM_INFINITY; in main()
238 rlim.rlim_max = RLIM_INFINITY; in main()
239 setrlimit (RLIMIT_STACK, &rlim); in main()
DGperf-trace.c221 struct rlimit rlim; in main() local
223 rlim.rlim_cur = RLIM_INFINITY; in main()
224 rlim.rlim_max = RLIM_INFINITY; in main()
225 setrlimit (RLIMIT_STACK, &rlim); in main()
/external/compiler-rt/test/asan/TestCases/
Dstack-overflow.cc89 struct rlimit rlim; in LimitStackAndReexec() local
90 int res = getrlimit(RLIMIT_STACK, &rlim); in LimitStackAndReexec()
92 if (rlim.rlim_cur == RLIM_INFINITY) { in LimitStackAndReexec()
93 rlim.rlim_cur = 128 * 1024; in LimitStackAndReexec()
94 res = setrlimit(RLIMIT_STACK, &rlim); in LimitStackAndReexec()
/external/chromium_org/third_party/tcmalloc/chromium/src/tests/
Dtestutil.cc67 struct rlimit rlim; in SetTestResourceLimit() local
68 if (getrlimit(USE_RESOURCE, &rlim) == 0) { in SetTestResourceLimit()
69 if (rlim.rlim_cur == RLIM_INFINITY || rlim.rlim_cur > kMaxMem) { in SetTestResourceLimit()
70 rlim.rlim_cur = kMaxMem; in SetTestResourceLimit()
71 setrlimit(USE_RESOURCE, &rlim); // ignore result in SetTestResourceLimit()
/external/chromium_org/third_party/tcmalloc/vendor/src/tests/
Dtestutil.cc67 struct rlimit rlim; in SetTestResourceLimit() local
68 if (getrlimit(USE_RESOURCE, &rlim) == 0) { in SetTestResourceLimit()
69 if (rlim.rlim_cur == RLIM_INFINITY || rlim.rlim_cur > kMaxMem) { in SetTestResourceLimit()
70 rlim.rlim_cur = kMaxMem; in SetTestResourceLimit()
71 setrlimit(USE_RESOURCE, &rlim); // ignore result in SetTestResourceLimit()
/external/strace/
Dresource.c59 } rlim; in print_rlimit64() local
61 if (umove(tcp, addr, &rlim) < 0) in print_rlimit64()
64 tprintf("{rlim_cur=%s,", sprint_rlim64(rlim.rlim_cur)); in print_rlimit64()
65 tprintf(" rlim_max=%s}", sprint_rlim64(rlim.rlim_max)); in print_rlimit64()
104 } rlim; in print_rlimit32() local
106 if (umove(tcp, addr, &rlim) < 0) in print_rlimit32()
109 tprintf("{rlim_cur=%s,", sprint_rlim32(rlim.rlim_cur)); in print_rlimit32()
110 tprintf(" rlim_max=%s}", sprint_rlim32(rlim.rlim_max)); in print_rlimit32()
/external/chromium_org/v8/src/base/
Dsys-info.cc114 struct rlimit rlim; in AmountOfVirtualMemory()
115 int result = getrlimit(RLIMIT_DATA, &rlim); in AmountOfVirtualMemory()
120 return (rlim.rlim_cur == RLIM_INFINITY) ? 0 : rlim.rlim_cur; in AmountOfVirtualMemory()
/external/compiler-rt/lib/tsan/rtl/
Dtsan_platform_linux.cc307 rlimit rlim; in getlim() local
308 CHECK_EQ(0, getrlimit(res, &rlim)); in getlim()
309 return rlim.rlim_cur; in getlim()
314 volatile rlimit rlim; in setlim() local
315 rlim.rlim_cur = lim; in setlim()
316 rlim.rlim_max = lim; in setlim()
317 setrlimit(res, (rlimit*)&rlim); in setlim()
/external/chromium_org/base/process/
Dprocess_linux.cc115 struct rlimit rlim; in CheckForNicePermission() local
116 if ((getrlimit(RLIMIT_NICE, &rlim) == 0) && in CheckForNicePermission()
117 (20 - kForegroundPriority) <= static_cast<int>(rlim.rlim_cur)) { in CheckForNicePermission()
Dprocess_util_unittest.cc451 struct rlimit rlim; in GetMaxFilesOpenInProcess() local
452 if (getrlimit(RLIMIT_NOFILE, &rlim) != 0) { in GetMaxFilesOpenInProcess()
459 if (rlim.rlim_cur > max_int) { in GetMaxFilesOpenInProcess()
463 return rlim.rlim_cur; in GetMaxFilesOpenInProcess()
/external/valgrind/main/include/
Dpub_tool_libcproc.h67 extern Int VG_(getrlimit) ( Int resource, struct vki_rlimit *rlim );
68 extern Int VG_(setrlimit) ( Int resource, const struct vki_rlimit *rlim );
/external/e2fsprogs/lib/ext2fs/
Dunix_io.c609 struct rlimit rlim; in unix_open() local
611 rlim.rlim_cur = rlim.rlim_max = (unsigned long) RLIM_INFINITY; in unix_open()
612 setrlimit(RLIMIT_FSIZE, &rlim); in unix_open()
613 getrlimit(RLIMIT_FSIZE, &rlim); in unix_open()
614 if (((unsigned long) rlim.rlim_cur) < in unix_open()
615 ((unsigned long) rlim.rlim_max)) { in unix_open()
616 rlim.rlim_cur = rlim.rlim_max; in unix_open()
617 setrlimit(RLIMIT_FSIZE, &rlim); in unix_open()
/external/chromium_org/sandbox/linux/services/
Dbroker_process_unittest.cc445 struct rlimit rlim; in SANDBOX_TEST_ALLOW_NOISE() local
446 SANDBOX_ASSERT(0 == getrlimit(RLIMIT_NOFILE, &rlim)); in SANDBOX_TEST_ALLOW_NOISE()
447 SANDBOX_ASSERT(fd_limit <= rlim.rlim_cur); in SANDBOX_TEST_ALLOW_NOISE()
448 rlim.rlim_cur = fd_limit; in SANDBOX_TEST_ALLOW_NOISE()
449 SANDBOX_ASSERT(0 == setrlimit(RLIMIT_NOFILE, &rlim)); in SANDBOX_TEST_ALLOW_NOISE()
/external/compiler-rt/test/dfsan/
Dcustom.c433 struct rlimit rlim; in test_getrlimit() local
434 dfsan_set_label(i_label, &rlim, sizeof(rlim)); in test_getrlimit()
435 assert(getrlimit(RLIMIT_CPU, &rlim) == 0); in test_getrlimit()
436 ASSERT_READ_ZERO_LABEL(&rlim, sizeof(rlim)); in test_getrlimit()
/external/valgrind/main/coregrind/
Dm_libcproc.c399 Int VG_(getrlimit) (Int resource, struct vki_rlimit *rlim) in VG_()
404 res = VG_(do_syscall2)(__NR_ugetrlimit, resource, (UWord)rlim); in VG_()
407 res = VG_(do_syscall2)(__NR_getrlimit, resource, (UWord)rlim); in VG_()
413 Int VG_(setrlimit) (Int resource, const struct vki_rlimit *rlim) in VG_()
417 res = VG_(do_syscall2)(__NR_setrlimit, resource, (UWord)rlim); in VG_()
/external/llvm/lib/Support/Unix/
DProcess.inc149 struct rlimit rlim;
150 rlim.rlim_cur = rlim.rlim_max = 0;
151 setrlimit(RLIMIT_CORE, &rlim);
/external/oprofile/daemon/
Doprofiled.c501 struct rlimit rlim = { 2048, 2048 }; in main() local
508 err = setrlimit(RLIMIT_NOFILE, &rlim); in main()
/external/compiler-rt/lib/msan/
Dmsan_interceptors.cc728 INTERCEPTOR(int, getrlimit, int resource, void *rlim) { in INTERCEPTOR() argument
730 return REAL(getrlimit)(resource, rlim); in INTERCEPTOR()
732 int res = REAL(getrlimit)(resource, rlim); in INTERCEPTOR()
734 __msan_unpoison(rlim, __sanitizer::struct_rlimit_sz); in INTERCEPTOR()
738 INTERCEPTOR(int, getrlimit64, int resource, void *rlim) { in INTERCEPTOR() argument
740 return REAL(getrlimit64)(resource, rlim); in INTERCEPTOR()
742 int res = REAL(getrlimit64)(resource, rlim); in INTERCEPTOR()
744 __msan_unpoison(rlim, __sanitizer::struct_rlimit64_sz); in INTERCEPTOR()
/external/compiler-rt/include/sanitizer/
Dlinux_syscall_hooks.h1254 #define __sanitizer_syscall_pre_getrlimit(resource, rlim) \ argument
1255 __sanitizer_syscall_pre_impl_getrlimit((long)(resource), (long)(rlim))
1256 #define __sanitizer_syscall_post_getrlimit(res, resource, rlim) \ argument
1257 __sanitizer_syscall_post_impl_getrlimit(res, (long)(resource), (long)(rlim))
1258 #define __sanitizer_syscall_pre_old_getrlimit(resource, rlim) \ argument
1259 __sanitizer_syscall_pre_impl_old_getrlimit((long)(resource), (long)(rlim))
1260 #define __sanitizer_syscall_post_old_getrlimit(res, resource, rlim) \ argument
1262 (long)(rlim))
1263 #define __sanitizer_syscall_pre_setrlimit(resource, rlim) \ argument
1264 __sanitizer_syscall_pre_impl_setrlimit((long)(resource), (long)(rlim))
[all …]
/external/blktrace/
Dblktrace.c624 struct rlimit rlim; in increase_limit() local
627 if (!getrlimit(resource, &rlim)) { in increase_limit()
628 rlim.rlim_cur += increase; in increase_limit()
629 if (rlim.rlim_cur >= rlim.rlim_max) in increase_limit()
630 rlim.rlim_max = rlim.rlim_cur + increase; in increase_limit()
632 if (!setrlimit(resource, &rlim)) in increase_limit()
/external/compiler-rt/lib/dfsan/
Ddfsan_custom.cc447 int __dfsw_getrlimit(int resource, struct rlimit *rlim, in __dfsw_getrlimit() argument
450 int ret = getrlimit(resource, rlim); in __dfsw_getrlimit()
452 dfsan_set_label(0, rlim, sizeof(struct rlimit)); in __dfsw_getrlimit()

12