Subject: Re: (question about memory limits)
To: Andrew Vincent <a.vincent@chemistry.unimelb.edu.au>
From: Henry B. Hotz <hotz@jpl.nasa.gov>
List: port-mac68k
Date: 09/08/2000 13:02:13
At 12:48 PM +1100 9/8/00, Andrew Vincent wrote:
>Does anyone know how to change the value of virtual memory? I am
>getting a virtual memory exhausted error. I know how to find the
>values for bash "ulimit
Is this a process error, or a system error? If the problem is
system-wide exhaustion of available VM then you need to add swap
space, not play with process limits.
If it's really a process limit then man sh under built-ins shows:
ulimit [-H | -S] [-a | -tfdscmlpn [value]]
Inquire about or set the hard or soft limits on processes or set
new limits. The choice between hard limit (which no process is al-
lowed to violate, and which may not be raised once it has been
lowered) and soft limit (which causes processes to be signaled but
not necessarily killed, and which may be raised) is made with
these flags:
-H set or inquire about hard limits
-S set or inquire about soft limits. If neither -H nor -S
is specified, the soft limit is displayed or both lim-
its are set. If both are specified, the last one wins.
The limit to be interrogated or set, then, is chosen by specifying
any one of these flags:
-a show all the current limits
-t show or set the limit on CPU time (in seconds)
-f show or set the limit on the largest file that can be
created (in 512-byte blocks)
-d show or set the limit on the data segment size of a
process (in kilobytes)
-s show or set the limit on the stack size of a process
(in kilobytes)
-c show or set the limit on the largest core dump size
that can be produced (in 512-byte blocks)
-m show or set the limit on the total physical memory
that can be in use by a process (in kilobytes)
-l show or set the limit on how much memory a process can
lock with mlock(2) (in kilobytes)
-p show or set the limit on the number of processes this
user can have at one time
-n show or set the limit on the number files a process
can have open at once
If none of these is specified, it is the limit on file size that
is shown or set. If value is specified, the limit is set to that
number; otherwise the current limit is displayed.
Limits of an arbitrary process can be displayed or set using the
sysctl(8) utility.
And you might need to change -d, -s, or -m.
Signature held pending an ISO 9000 compliant
signature design and approval process.
h.b.hotz@jpl.nasa.gov, or hbhotz@oxy.edu