1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2026-01-03 08:41:04 +01:00

zsh-workers/8229

This commit is contained in:
Tanaka Akira 1999-10-13 13:45:14 +00:00
parent ace2616432
commit f67feb4054
3 changed files with 22 additions and 1 deletions

View file

@ -523,6 +523,8 @@ sitem(tt(cputime))(Maximum CPU seconds per process.)
sitem(tt(maxproc))(Maximum number of processes.)
sitem(tt(addressspace))(Maximum amount of address space used.)
sitem(tt(cachedthreads))(Maximum number of cached threads.)
sitem(tt(aiooperations))(Maximum number of AIO operations.)
sitem(tt(aiomemorylocked))(Maximum amount of memory locked in RAM for AIO operations.)
endsitem()
Which of these resource limits are available depends on the system.

View file

@ -6,7 +6,7 @@
#
BEGIN {limidx = 0}
/^[\t ]*(#[\t ]*define[\t _]*RLIMIT_[A-Z]*[\t ]*[0-9][0-9]*|RLIMIT_[A-Z]*,[\t ]*)/ {
/^[\t ]*(#[\t ]*define[\t _]*RLIMIT_[A-Z_]*[\t ]*[0-9][0-9]*|RLIMIT_[A-Z]*,[\t ]*)/ {
limindex = index($0, "RLIMIT_")
limtail = substr($0, limindex, 80)
split(limtail, tmp)
@ -35,6 +35,8 @@ BEGIN {limidx = 0}
if (limnam == "NPROC") { msg[limnum] = "maxproc" }
if (limnam == "AS") { msg[limnum] = "addressspace" }
if (limnam == "TCACHE") { msg[limnum] = "cachedthreads" }
if (limnam == "AIO_OPS") { msg[limnum] = "aiooperations" }
if (limnam == "AIO_MEM") { msg[limnum] = "aiomemorylocked" }
}
}
}

View file

@ -218,6 +218,20 @@ printulimit(int lim, int hard, int head)
printf("cached threads ");
break;
# endif /* RLIMIT_TCACHE */
# ifdef RLIMIT_AIO_OPS
case RLIMIT_AIO_OPS:
if (head)
printf("AIO operations ");
break;
# endif /* RLIMIT_AIO_OPS */
# ifdef RLIMIT_AIO_MEM
case RLIMIT_AIO_MEM:
if (head)
printf("AIO locked-in-memory (kb) ");
if (limit != RLIM_INFINITY)
limit /= 1024;
break;
# endif /* RLIMIT_AIO_MEM */
}
/* display the limit */
if (limit == RLIM_INFINITY)
@ -538,6 +552,9 @@ bin_ulimit(char *name, char **argv, char *ops, int func)
# ifdef RLIMIT_VMEM
case RLIMIT_VMEM:
# endif /* RLIMIT_VMEM */
# ifdef RLIMIT_AIO_MEM
case RLIMIT_AIO_MEM:
# endif /* RLIMIT_AIO_MEM */
limit *= 1024;
break;
}