SET4(8) System Manager's Manual SET4(8)
set4, unset4, check4 - set, unset, and check the 4 megabyte process
virtual address space limit flag in a Sun386i module
set4 [ -d working_directory ] [ - | filename ] ...
Available only on Sun 386i systems running a SunOS 4.0.x release or
earlier. Not a SunOS 4.1 release feature.
set4 sets the 4 megabyte process memory flag in each filename program
image, limiting the virtual address space for each program to 4
megabytes. If a `-' is used, set4 reads the standard input for a list
of files to set the 4 megabyte limit on. Lines in the standard input
whose first character is `#' are ignored, so files may include com-
unset4 clears the 4 megabyte process memory flag in the program image,
so the process virtual address space is not limited to 4 megabytes.
check4 reports programs that do not have the 4 megabyte limit set, and
does not report programs with the limit set.
This specifies a directory prefix for file names that set4 pro-
Suppose that the file small_progs contains the following:
# These files should have their virtual address spaces limited to 4 MB:
Then the following command will run set4 on /build/bin/false,
/build/bin/date, /build/bin/true, and /build/bin/cat.
example% set4 -d /build /bin/false -
/bin/cat << small_progs
In this example, unset4 clears the 4 megabyte limit flag in date, and
example% unset4 /bin/date /etc/clri
In the last example, check4 shows that date and clri are 4 megabyte
processes, but basename is not.
example% check4 /bin/date /etc/clri /usr/bin/basename
basename is not a 4MB process
There is a problem in the way that processes that have the 4 megabyte
limit set exec() processes that do not have the limit set. (See
execve(2V) and execl(3V) for descriptions of exec() processing.) For a
short time during the exec(), a child has the parent's data and stack
limits. During this time, the program is checked to see if it will fit
into memory. If the parent had the 4 megabyte limit set, the test
fails, because the child program is running with the parent's 4
megabyte limit. This only affects programs which have more than 4
megabytes of global or static data compiled into the program. It does
not affect programs which use malloc(3V) to obtain memory.
For example, csh(1) and sh(1) may be 4 megabyte processes. If they
are, and if you try to run a program with more than 4 megabytes of
global and static data, the shell cannot successfully exec(). To fix
this problem, become root on your machine and enter the following com-
example% /etc/mount -o remount,rw /usr
/usr/etc/unset4 /bin/csh /bin/sh
Then log out and back in again to run the modified shell. This makes
csh and sh "normal" processes.
6 October 1989 SET4(8)