]> git.lizzy.rs Git - plan9front.git/blob - sys/man/3/swap
namespace(4): fix $home bin paths
[plan9front.git] / sys / man / 3 / swap
1 .TH SWAP 3
2 .SH NAME
3 swap \- memory usage statistics and swap file control
4 .SH SYNOPSIS
5 .nf
6 .B bind -a #ΒΆ /dev
7
8 .B /dev/swap
9 .fi
10 .SH DESCRIPTION
11 The
12 .B swap
13 device holds a text block giving memory usage statistics:
14 .IP
15 .EX
16 \fIn\fP memory
17 \fIn\fP pagesize
18 \fIn\fP kernel
19 \fIn\fP/\fIm\fP user
20 \fIn\fP/\fIm\fP swap
21 \fIa\fP/\fIn\fP/\fIm\fP kernel malloc
22 \fIa\fP/\fIn\fP/\fIm\fP kernel draw
23 \fIa\fP/\fIn\fP/\fIm\fP kernel secret
24 .EE
25 .PP
26 These are total memory (bytes), system page size (bytes),
27 kernel memory (pages), user memory (pages), swap space (pages),
28 kernel malloced data (bytes), kernel graphics data (bytes)
29 and kernel secret data (bytes).
30 The expression
31 .IR n / m
32 indicates
33 .I n
34 used out of
35 .I m
36 available.
37 For kernel malloc and kernel draw,
38 .IR a
39 indicates the current allocation in bytes.
40 These numbers are not blank padded.
41 .PP
42 To turn on swapping, write to
43 .B swap
44 the textual file descriptor number of a file or device on which to swap.
45 .PP
46 Only the hostowner is allowed to enable swapping. The pages written to
47 the swap file are transparently encrypted by the kernel using a random key.
48 .SH SEE ALSO
49 .IR memory (8),
50 .IR swap (8).
51 .SH SOURCE
52 .B /sys/src/9/port/devswap.c