/external/blktrace/btt/ |
D | misc.c | 89 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/ |
D | sanitizer_posix_libcdep.cc | 55 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()
|
D | sanitizer_common_syscalls.inc | 2019 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/ |
D | test-mem.c | 89 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()
|
D | Gperf-simple.c | 235 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()
|
D | Gperf-trace.c | 221 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/ |
D | stack-overflow.cc | 89 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/ |
D | testutil.cc | 67 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/ |
D | testutil.cc | 67 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/ |
D | resource.c | 59 } 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/ |
D | sys-info.cc | 114 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/ |
D | tsan_platform_linux.cc | 307 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/ |
D | process_linux.cc | 115 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()
|
D | process_util_unittest.cc | 451 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/ |
D | pub_tool_libcproc.h | 67 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/ |
D | unix_io.c | 609 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/ |
D | broker_process_unittest.cc | 445 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/ |
D | custom.c | 433 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/ |
D | m_libcproc.c | 399 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/ |
D | Process.inc | 149 struct rlimit rlim; 150 rlim.rlim_cur = rlim.rlim_max = 0; 151 setrlimit(RLIMIT_CORE, &rlim);
|
/external/oprofile/daemon/ |
D | oprofiled.c | 501 struct rlimit rlim = { 2048, 2048 }; in main() local 508 err = setrlimit(RLIMIT_NOFILE, &rlim); in main()
|
/external/compiler-rt/lib/msan/ |
D | msan_interceptors.cc | 728 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/ |
D | linux_syscall_hooks.h | 1254 #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/ |
D | blktrace.c | 624 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/ |
D | dfsan_custom.cc | 447 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()
|