]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/swap
merge
[plan9front.git] / sys / man / 8 / swap
1 .TH SWAP 8
2 .SH NAME
3 swap \- establish a swap file
4 .SH SYNOPSIS
5 .B swap
6 .I file 
7 .SH DESCRIPTION
8 .I Swap
9 establishes a file for the system to swap on.
10 If
11 .I file
12 is an existing file, it is used for system swap. If it
13 does not exist, a new file is created. If
14 .I file
15 is a directory, a unique file is created in that directory
16 on which to swap.
17 The environment variable
18 .B swap
19 is set to the full name of the resulting file.
20 The number of blocks available in the file or device
21 must be at least the number of swap blocks configured
22 at system boot time.
23 .PP
24 If a swap channel has already been set and no blocks
25 are currently valid in the file the old file will be
26 closed and then replaced. If any blocks are valid on
27 the device an error is returned instead.
28 .SH SOURCE
29 .B /sys/src/cmd/swap.c
30 .SH BUGS
31 Swapping to a file served by a local user-level process
32 will lead to deadlock if the process isn't made non-swappable
33 (see the
34 .B noswap
35 ctl-message in
36 .IR proc (3)).
37 .SH "SEE ALSO"
38 .IR swap (3),
39 .IR proc (3)