Home
last modified time | relevance | path

Searched refs:getrlimit (Results 1 - 25 of 78) sorted by relevance

1234

/third_party/rust/crates/rustix/examples/
H A Dprocess.rs45 println!("Cpu Limit: {:?}", getrlimit(Resource::Cpu)); in main()
46 println!("Fsize Limit: {:?}", getrlimit(Resource::Fsize)); in main()
47 println!("Data Limit: {:?}", getrlimit(Resource::Data)); in main()
48 println!("Stack Limit: {:?}", getrlimit(Resource::Stack)); in main()
50 println!("Core Limit: {:?}", getrlimit(Resource::Core)); in main()
52 println!("Rss Limit: {:?}", getrlimit(Resource::Rss)); in main()
54 println!("Nproc Limit: {:?}", getrlimit(Resource::Nproc)); in main()
56 println!("Nofile Limit: {:?}", getrlimit(Resource::Nofile)); in main()
58 println!("Memlock Limit: {:?}", getrlimit(Resource::Memlock)); in main()
60 println!("As Limit: {:?}", getrlimit(Resourc in main()
[all...]
/third_party/python/Lib/test/
H A Dtest_resource.py16 self.assertRaises(TypeError, resource.getrlimit)
17 self.assertRaises(TypeError, resource.getrlimit, 42, 42)
25 (cur, max) = resource.getrlimit(resource.RLIMIT_FSIZE)
39 (cur, max) = resource.getrlimit(resource.RLIMIT_FSIZE)
88 (cur, max) = resource.getrlimit(resource.RLIMIT_FSIZE)
122 limits = resource.getrlimit(resource.RLIMIT_CPU)
158 limit = resource.getrlimit(resource.RLIMIT_AS)
173 limits = resource.getrlimit(resource.RLIMIT_AS)
/third_party/rust/crates/rustix/tests/process/
H A Drlimit.rs7 let lim = rustix::process::getrlimit(Resource::Stack); in test_getrlimit()
15 let old = rustix::process::getrlimit(Resource::Core); in test_setrlimit()
23 let lim = rustix::process::getrlimit(Resource::Core); in test_setrlimit()
33 let first = rustix::process::getrlimit(Resource::Core); in test_setrlimit()
/third_party/rust/crates/nix/test/
H A Dtest_resource.rs7 use nix::sys::resource::{getrlimit, setrlimit, Resource};
9 /// Tests the RLIMIT_NOFILE functionality of getrlimit(), where the resource RLIMIT_NOFILE refers
13 /// We first fetch the existing file descriptor maximum values using getrlimit(), then edit the
15 /// to put the new soft limit in effect, and then getrlimit() once more to ensure the limits have
26 getrlimit(Resource::RLIMIT_NOFILE).unwrap(); in test_resource_limits_nofile()
32 let (new_soft_limit, _) = getrlimit(Resource::RLIMIT_NOFILE).unwrap(); in test_resource_limits_nofile()
/third_party/musl/porting/liteos_a/user/src/misc/
H A Dgetrlimit.c7 int getrlimit(int resource, struct rlimit *rlim) in getrlimit() function
20 weak_alias(getrlimit, getrlimit64);
/third_party/musl/libc-test/src/functionalext/supplement/misc/
H A Dgetrlimit.c22 * @tc.desc : Verify getrlimit process success
36 ret = getrlimit(r, &retrl); in getrlimit_0100()
44 * @tc.desc : Verify getrlimit process success fail bacaus param is error
50 int ret = getrlimit(-1, &limit); in getrlimit_0200()
/third_party/musl/src/misc/
H A Dgetrlimit.c7 int getrlimit(int resource, struct rlimit *rlim) in getrlimit() function
40 weak_alias(getrlimit, getrlimit64);
/third_party/rust/crates/rustix/src/process/
H A Drlimit.rs7 /// `struct rlimit`—Current and maximum values used in [`getrlimit`],
17 /// `getrlimit(resource)`—Get a process resource limit value.
23 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/getrlimit.html
24 /// [Linux]: https://man7.org/linux/man-pages/man2/getrlimit.2.html
26 pub fn getrlimit(resource: Resource) -> Rlimit { in getrlimit() functions
27 backend::process::syscalls::getrlimit(resource) in getrlimit()
/third_party/musl/porting/liteos_m/kernel/include/sys/
H A Dresource.h49 int getrlimit (int, struct rlimit *);
102 #define getrlimit64 getrlimit
/third_party/musl/porting/uniproton/kernel/include/sys/
H A Dresource.h49 int getrlimit (int, struct rlimit *);
102 #define getrlimit64 getrlimit
/third_party/musl/porting/liteos_m_iccarm/kernel/include/sys/
H A Dresource.h49 int getrlimit (int, struct rlimit *);
102 #define getrlimit64 getrlimit
/third_party/musl/porting/liteos_a/kernel/include/sys/
H A Dresource.h49 int getrlimit (int, struct rlimit *);
102 #define getrlimit64 getrlimit
/third_party/musl/include/sys/
H A Dresource.h49 int getrlimit (int, struct rlimit *);
102 #define getrlimit64 getrlimit
/third_party/rust/crates/nix/src/sys/
H A Dresource.rs36 /// * [Linux](https://man7.org/linux/man-pages/man2/getrlimit.2.html)
189 /// # use nix::sys::resource::{getrlimit, Resource};
191 /// let (soft_limit, hard_limit) = getrlimit(Resource::RLIMIT_NOFILE).unwrap();
198 /// [getrlimit(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/getrlimit.html#tag_16_215)
201 pub fn getrlimit(resource: Resource) -> Result<(rlim_t, rlim_t)> { in getrlimit() functions
206 let res = unsafe { libc::getrlimit(resource as __rlimit_resource_t, old_rlim.as_mut_ptr()) }; in getrlimit()
208 let res = unsafe { libc::getrlimit(resource as c_int, old_rlim.as_mut_ptr()) }; in getrlimit()
243 /// [setrlimit(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/getrlimit.html#tag_16_215)
/third_party/musl/src/legacy/
H A Dgetdtablesize.c13 getrlimit(RLIMIT_NOFILE, &rl); in getdtablesize()
H A Dulimit.c14 getrlimit(RLIMIT_FSIZE, &rl); in ulimit()
/third_party/musl/porting/liteos_a/user/src/legacy/
H A Dgetdtablesize.c11 getrlimit(RLIMIT_NOFILE, &rl); in getdtablesize()
H A Dulimit.c10 getrlimit(RLIMIT_FSIZE, &rl); in ulimit()
/third_party/musl/porting/linux/user/src/legacy/
H A Dulimit.c9 getrlimit(RLIMIT_FSIZE, &rl); in ulimit()
/third_party/ltp/testcases/kernel/syscalls/getrlimit/
H A Dgetrlimit02.c10 * Test for checking error conditions for getrlimit(2)
11 * 1) getrlimit(2) returns -1 and sets errno to EFAULT if an invalid
13 * 2) getrlimit(2) returns -1 and sets errno to EINVAL if an invalid
39 TST_EXP_FAIL(getrlimit(tc->res_type, tc->rlim), in verify_getrlimit()
41 "getrlimit() with %s", in verify_getrlimit()
H A Dgetrlimit01.c10 * Verify that getrlimit(2) call will be successful for all possible resource
50 TST_EXP_PASS(getrlimit(tc->res, &rlim), in verify_getrlimit()
51 "getrlimit() test for %s", in verify_getrlimit()
/third_party/musl/libc-test/src/common/
H A Dsetrlim.c10 if (getrlimit(r, &rl)) { in t_setrlim()
11 t_error("getrlimit %d: %s\n", r, strerror(errno)); in t_setrlim()
/third_party/mksh/
H A Dulimit.c295 if (getrlimit(l->resource, &limit) < 0) { in set_ulimit()
334 if (getrlimit(l->resource, &limit)) in print_ulimit()
/third_party/musl/libc-test/src/regression/
H A Drlimit-open-files.c20 if (getrlimit(r, &rl)) in main()
21 t_error("getrlimit(%d) failed: %s\n", r, strerror(errno)); in main()
23 t_error("getrlimit %d says cur=%ld,max=%ld after setting the limit to %ld\n", r, rl.rlim_cur, rl.rlim_max, lim); in main()
/third_party/ltp/testcases/kernel/syscalls/getdtablesize/
H A Dgetdtablesize01.c63 getrlimit(RLIMIT_NOFILE, &rlp); in main()
70 "Checking with the value returned by getrlimit...RLIMIT_NOFILE"); in main()

Completed in 7 milliseconds

1234