mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-05 22:39:35 -05:00
ifdef RLIMIT_AS in recently added check
Some OS still don't have RLIMIT_AS
This commit is contained in:
parent
e217bb48ad
commit
cde6284a03
1 changed files with 2 additions and 0 deletions
|
|
@ -212,12 +212,14 @@ checkrlimits(struct config_file* cfg)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef RLIMIT_AS
|
||||
if(getrlimit(RLIMIT_AS, &rlim) == 0) {
|
||||
if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY &&
|
||||
rlim.rlim_cur < (rlim_t)memsize_expect) {
|
||||
log_warn("the ulimit(max memory size) is smaller than the expected memory usage (added size of caches). %u < %u bytes", (unsigned)rlim.rlim_cur, (unsigned)memsize_expect);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(getrlimit(RLIMIT_DATA, &rlim) == 0) {
|
||||
if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY &&
|
||||
rlim.rlim_cur < memsize_expect) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue