unset4 filename...
check4 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 comments.
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.
Suppose that the file small_progs contains the following:
# These files should have their virtual address spaces limited to 4 MB: /bin/date /bin/true
example% set4 -d /build /bin/false - /bin/cat < small_progs
example%
In this example, unset4 clears the 4 megabyte limit flag in date, and clri.
example% unset4 /bin/date /etc/clri example%
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 example%
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 commands:
example% /etc/mount -o remount,rw /usr /usr/etc/unset4 /bin/csh /bin/sh example%
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97