glenda.party
term% ls -F
term% pwd
$home/manuals/9front/8/swap
term% cat index.txt
SWAP(8)                     System Manager's Manual                    SWAP(8)



NAME
       swap - establish a swap file

SYNOPSIS
       swap file

DESCRIPTION
       Swap  establishes  a file for the system to swap on.  If file is an ex‐
       isting file, it is used for system swap. If it does not  exist,  a  new
       file  is  created.  If file is a directory, a unique file is created in
       that directory on which to swap.  The environment variable swap is  set
       to the full name of the resulting file.  The number of blocks available
       in the file or device must be at least the number of swap  blocks  con‐
       figured at system boot time.

       If  a  swap  channel  has  already been set and no blocks are currently
       valid in the file the old file will be closed and then replaced. If any
       blocks are valid on the device an error is returned instead.

SOURCE
       /sys/src/cmd/swap.c

BUGS
       Swapping  to  a  file  served  by  a  local user-level process, such as
       kfs(4), will lead to deadlock if the process isn't  made  non-swappable
       (see the noswap ctl-message in proc(3)).

SEE ALSO
       proc(3)



                                                                       SWAP(8)