use RLIMIT_AS if RLIMIT_VMEM is not available
they roughly equal each other anyway
This commit is contained in:
parent
0df992276b
commit
50b9b9181b
7
funcs.c
7
funcs.c
|
@ -1,4 +1,4 @@
|
|||
/** $MirOS: src/bin/mksh/funcs.c,v 1.9 2005/05/25 23:31:06 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/funcs.c,v 1.10 2005/06/08 10:14:08 tg Exp $ */
|
||||
/* $OpenBSD: c_ksh.c,v 1.27 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: c_sh.c,v 1.29 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: c_test.c,v 1.17 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
|
@ -13,7 +13,7 @@
|
|||
#include <ulimit.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.9 2005/05/25 23:31:06 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.10 2005/06/08 10:14:08 tg Exp $");
|
||||
|
||||
int
|
||||
c_cd(char **wp)
|
||||
|
@ -2869,6 +2869,9 @@ c_ulimit(char **wp)
|
|||
#ifdef RLIMIT_VMEM
|
||||
{ "vmemory(KiB)", RLIMIT, RLIMIT_VMEM, RLIMIT_VMEM,
|
||||
1024, 'v' },
|
||||
#elif defined(RLIMIT_AS)
|
||||
{ "amemory(KiB)", RLIMIT, RLIMIT_AS, RLIMIT_AS,
|
||||
1024, 'v' },
|
||||
#endif
|
||||
#ifdef RLIMIT_SWAP
|
||||
{ "swap(KiB)", RLIMIT, RLIMIT_SWAP, RLIMIT_SWAP,
|
||||
|
|
4
mksh.1
4
mksh.1
|
@ -1,4 +1,4 @@
|
|||
.\" $MirOS: src/bin/mksh/mksh.1,v 1.5 2005/05/25 23:31:07 tg Exp $
|
||||
.\" $MirOS: src/bin/mksh/mksh.1,v 1.6 2005/06/08 10:14:09 tg Exp $
|
||||
.\" $OpenBSD: ksh.1,v 1.98 2005/05/12 09:18:24 jmc Exp $
|
||||
.\" $OpenBSD: sh.1tbl,v 1.53 2004/12/10 01:56:56 jaredy Exp $
|
||||
.\"-
|
||||
|
@ -4159,6 +4159,8 @@ CPU seconds spent in user mode to be used by each process.
|
|||
Impose a limit of
|
||||
.Ar n
|
||||
kibibytes on the amount of virtual memory used.
|
||||
If the operating system has no concept of a virtual memory
|
||||
limit, an available memory limit is used instead.
|
||||
.It Fl w Ar n
|
||||
Impose a limit of
|
||||
.Ar n
|
||||
|
|
Loading…
Reference in New Issue