File: swapon.2

package info (click to toggle)
manpages-ja 0.5.0.0.20050315-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,620 kB
  • ctags: 4
  • sloc: sh: 12,675; perl: 157; makefile: 106
file content (144 lines) | stat: -rw-r--r-- 4,603 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\" 
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Modified by Michael Haardt <michael@moria.de>
.\" Modified Sat Jul 24 11:47:53 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified 22 July 1995 by Michael Chastain <mec@duracef.shout.net>:
.\"   Added 'swapflags' argument.
.\" Added historical remark, aeb, 950723.
.\" Modified Tue Oct 22 22:23:50 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified 980908, aeb.
.\"
.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
.\"         all rights reserved.
.\" Translated Mon Mar  3 23:54:56 JST 1997
.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Modified Tue Dec  1 00:08:07 JST 1998
.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\"
.\"WORD:	swap			å
.\"WORD:	block device		֥åǥХ
.\"WORD:	super-user		ѡ桼
.\"WORD:	round robin		饦ɡӥ
.\"WORD:	partition		ѡƥ
.\"WORD:	page			ڡ
.\"WORD:	kernel			ͥ
.\"
.TH SWAPON 2 "22 July 1995" "Linux 1.3.6" "Linux Programmer's Manual"
.SH ̾
swapon, swapoff \- ե/ǥХؤΥå(swap)򳫻/ߤ
.SH 
.B #include <unistd.h>
.br
.B #include <asm/page.h>     /* to find PAGE_SIZE */
.br
.B #include <sys/swap.h>
.sp
.BI "int swapon(const char *" path ", int " swapflags );
.br
.BI "int swapoff(const char *" path );
.SH 
.B swapon

.IR path
ǻꤵ줿ե֥åǥХ(block device)
åΰ(swap area)ꤹ롣
.B swapoff

.IR path
ǻꤵ줿ե֥åǥХؤΥåפߤ롣
.PP
.B swapon

.I swapflags
.I swapflags

.I SWAP_FLAG_PREFER
ӥåȤꤵ줿ϡåΰϥǥեȤ⤤
ͥ(priority)ġͥ٤ϰʲΤ褦˥ɲƤ롣
.br
.sp
.I "    (prio << SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK"
.br
.PP
δؿϥѡ桼Τ߻ѤǤ롣
.SH ͥ
줾ΥåΰϹ⤤(high)㤤(low)Τɤ餫
ͥ٤ġǥեȤͥ٤㤤
㤤ͥ٤ΰˤơΰϸŤΰꤵ㤤
ͥ٤ġ
.PP
.I swapflags
ꤵ줿ΤƤȹ⤤ͥ٤ȤʤꡢǥեȤ⤤ͥ٤ġ
Ѽ(caller)ϤǤʤͤǤ롣
礭ʿϹ⤤ͥ٤̣롣
.PP
⤤ͥ٤ΰ褫˥åסڡ(swap page)ȤƻѤ롣
㤤ͥ٤ΰѤˤ⤤ͥ٤
ΰȤڤ롣⤷İʾΰ褬Ʊͥ٤
Ȥǰֹ⤤ͥ٤ǤСΥڡϴ֤
饦ɡӥ(round robin)ʬ롣
.PP
Linux 1.3.6 ˤơͥ̾Ϥε§˽äƤ롣
㳰¸ߤƤ롣
.SH ֤
ϥ֤롣顼ξ \-1 ֤졢
.I errno
Ŭڤꤵ롣
.SH 顼
.I path
Ŭڤʾ硢¾¿Υ顼ǽ롣

.TP
.B EPERM
桼ѡ桼Ǥʤ
.B MAX_SWAPFILES
(Linux 1.3.6 Ǥ 8 )ʾΥåפѤƤ롣
.TP
.B EINVAL
.I path 
¸ߤ뤬̾ΥѥǤ֥åǥХǤʤ֤롣
.TP
.B ENOENT
.I path  
¸ߤʤ֤롣
.TP
.B ENOMEM
åפ򳫻ϤΤ˽ʬʥ꡼¸ߤʤ֤롣

.SH 
δؿ Linux ͭǤꡢܿȰտޤץǤ
ѤƤϤʤ
ܤ `swapflags`  Linux 1.3.2 Ƴ줿
.SH 
ѡƥ(partition)ѥ
.BR mkswap (8)
ˤäƽƤʤФʤʤ
.SH Ϣ
.BR mkswap (8),
.BR swapon (8),
.BR swapoff (8)