Add diclaimer of copyright to _osname() manual page.
[unix-history] / lib / libc / db / doc / mpool.3.ps
CommitLineData
fdeaf90b
RG
1%!PS-Adobe-3.0
2%%Creator: groff version 1.08
3%%DocumentNeededResources: font Times-Roman
4%%+ font Times-Bold
5%%+ font Times-Italic
6%%DocumentSuppliedResources: procset grops 1.08 0
7%%Pages: 2
8%%PageOrder: Ascend
9%%Orientation: Portrait
10%%EndComments
11%%BeginProlog
12%%BeginResource: procset grops 1.08 0
13/setpacking where{
14pop
15currentpacking
16true setpacking
17}if
18/grops 120 dict dup begin
19/SC 32 def
20/A/show load def
21/B{0 SC 3 -1 roll widthshow}bind def
22/C{0 exch ashow}bind def
23/D{0 exch 0 SC 5 2 roll awidthshow}bind def
24/E{0 rmoveto show}bind def
25/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
26/G{0 rmoveto 0 exch ashow}bind def
27/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
28/I{0 exch rmoveto show}bind def
29/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
30/K{0 exch rmoveto 0 exch ashow}bind def
31/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
32/M{rmoveto show}bind def
33/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
34/O{rmoveto 0 exch ashow}bind def
35/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
36/Q{moveto show}bind def
37/R{moveto 0 SC 3 -1 roll widthshow}bind def
38/S{moveto 0 exch ashow}bind def
39/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
40/SF{
41findfont exch
42[exch dup 0 exch 0 exch neg 0 0]makefont
43dup setfont
44[exch/setfont cvx]cvx bind def
45}bind def
46/MF{
47findfont
48[5 2 roll
490 3 1 roll
50neg 0 0]makefont
51dup setfont
52[exch/setfont cvx]cvx bind def
53}bind def
54/level0 0 def
55/RES 0 def
56/PL 0 def
57/LS 0 def
58/PLG{
59gsave newpath clippath pathbbox grestore
60exch pop add exch pop
61}bind def
62/BP{
63/level0 save def
641 setlinecap
651 setlinejoin
6672 RES div dup scale
67LS{
6890 rotate
69}{
700 PL translate
71}ifelse
721 -1 scale
73}bind def
74/EP{
75level0 restore
76showpage
77}bind def
78/DA{
79newpath arcn stroke
80}bind def
81/SN{
82transform
83.25 sub exch .25 sub exch
84round .25 add exch round .25 add exch
85itransform
86}bind def
87/DL{
88SN
89moveto
90SN
91lineto stroke
92}bind def
93/DC{
94newpath 0 360 arc closepath
95}bind def
96/TM matrix def
97/DE{
98TM currentmatrix pop
99translate scale newpath 0 0 .5 0 360 arc closepath
100TM setmatrix
101}bind def
102/RC/rcurveto load def
103/RL/rlineto load def
104/ST/stroke load def
105/MT/moveto load def
106/CL/closepath load def
107/FL{
108currentgray exch setgray fill setgray
109}bind def
110/BL/fill load def
111/LW/setlinewidth load def
112/RE{
113findfont
114dup maxlength 1 index/FontName known not{1 add}if dict begin
115{
1161 index/FID ne{def}{pop pop}ifelse
117}forall
118/Encoding exch def
119dup/FontName exch def
120currentdict end definefont pop
121}bind def
122/DEFS 0 def
123/EBEGIN{
124moveto
125DEFS begin
126}bind def
127/EEND/end load def
128/CNT 0 def
129/level1 0 def
130/PBEGIN{
131/level1 save def
132translate
133div 3 1 roll div exch scale
134neg exch neg exch translate
1350 setgray
1360 setlinecap
1371 setlinewidth
1380 setlinejoin
13910 setmiterlimit
140[]0 setdash
141/setstrokeadjust where{
142pop
143false setstrokeadjust
144}if
145/setoverprint where{
146pop
147false setoverprint
148}if
149newpath
150/CNT countdictstack def
151userdict begin
152/showpage{}def
153}bind def
154/PEND{
155clear
156countdictstack CNT sub{end}repeat
157level1 restore
158}bind def
159end def
160/setpacking where{
161pop
162setpacking
163}if
164%%EndResource
165%%IncludeResource: font Times-Roman
166%%IncludeResource: font Times-Bold
167%%IncludeResource: font Times-Italic
168grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
169792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron
170/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
171/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
172/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
173/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
174/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
175/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
176/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
177/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
178/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
179/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
180/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
181/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
182/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
183/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
184/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
185/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
186/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
187/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
188/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
189/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
190/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
191/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
192/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
193/udieresis/yacute/thorn/ydieresis]def/Times-Italic@0 ENC0/Times-Italic RE
194/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
195%%EndProlog
196%%Page: 1 1
197%%BeginPageSetup
198BP
199%%EndPageSetup
9ac3792a
AM
200/F0 10/Times-Roman@0 SF 129.01(MPOOL\(3\) BSD)72 48 R(Programmer')2.5 E 2.5(sM)
201-.55 G 129.01(anual MPOOL\(3\))340.17 48 R/F1 9/Times-Bold@0 SF -.18(NA)72 84 S
202(ME).18 E F0(mpool \255 shared memory b)108 96 Q(uf)-.2 E(fer pool)-.25 E F1
203(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(#include <db)108 124.8 Q(.h>)-.4 E
204(#include <mpool.h>)108 136.8 Q(MPOOL *)108 160.8 Q(mpool_open \(DBT *k)108
205172.8 Q(ey)-.1 E 2.5(,i)-.55 G(nt fd, pgno_t pagesize, pgno_t maxcache\);)
206216.25 172.8 Q -.1(vo)108 196.8 S(id).1 E(mpool_\214lter \(MPOOL *mp, v)108
207208.8 Q(oid \(*pgin\)\(v)-.1 E(oid *, pgno_t, v)-.1 E(oid *\),)-.1 E -.1(vo)158
208220.8 S(id \(*pgout\)\(v).1 E(oid *, pgno_t, v)-.1 E(oid *\), v)-.1 E
209(oid *pgcookie\);)-.1 E -.1(vo)108 244.8 S(id *).1 E
210(mpool_new \(MPOOL *mp, pgno_t *pgnoaddr\);)108 256.8 Q -.1(vo)108 280.8 S
211(id *).1 E(mpool_get \(MPOOL *mp, pgno_t pgno, u_int \215ags\);)108 292.8 Q
212(int)108 316.8 Q(mpool_put \(MPOOL *mp, v)108 328.8 Q(oid *pgaddr)-.1 E 2.5(,u)
213-.92 G(_int \215ags\);)290.62 328.8 Q(int)108 352.8 Q
fdeaf90b
RG
214(mpool_sync \(MPOOL *mp\);)108 364.8 Q(int)108 388.8 Q
215(mpool_close \(MPOOL *mp\);)108 400.8 Q F1(DESCRIPTION)72 417.6 Q/F3 10
216/Times-Italic@0 SF(Mpool)108 429.6 Q F0 1.013(is the library interf)3.513 F
2171.013(ace intended to pro)-.1 F 1.013(vide page oriented b)-.15 F(uf)-.2 E
2181.012(fer management of \214les.)-.25 F 1.012(The b)6.012 F(uf)-.2 E(fers)-.25
219E(may be shared between processes.)108 441.6 Q .416(The function)108 458.4 R F3
220(mpool_open)2.916 E F0 .417(initializes a memory pool.)2.917 F(The)5.417 E F3
221-.1(ke)2.917 G(y)-.2 E F0(ar)2.917 E .417(gument is the byte string used to ne)
222-.18 F(gotiate)-.15 E .697(between multiple processes wishing to share b)108
223470.4 R(uf)-.2 E 3.196(fers. If)-.25 F .696(the \214le b)3.196 F(uf)-.2 E .696
224(fers are mapped in shared memory)-.25 F 3.196(,a)-.65 G(ll)534.44 470.4 Q .894
225(processes using the same k)108 482.4 R 1.194 -.15(ey w)-.1 H .894
226(ill share the b).15 F(uf)-.2 E 3.394(fers. If)-.25 F F3 -.1(ke)3.394 G(y)-.2 E
227F0 .895(is NULL, the b)3.395 F(uf)-.2 E .895(fers are mapped into pri)-.25 F
228-.25(va)-.25 G(te).25 E(memory)108 494.4 Q 5.116(.T)-.65 G(he)154.406 494.4 Q
229F3(fd)2.616 E F0(ar)2.616 E .115(gument is a \214le descriptor for the underly\
230ing \214le, which must be seekable.)-.18 F(If)5.115 E F3 -.1(ke)2.615 G(y)-.2 E
231F0 .115(is non-)2.615 F(NULL and matches a \214le already being mapped, the)108
232506.4 Q F3(fd)2.5 E F0(ar)2.5 E(gument is ignored.)-.18 E(The)108 523.2 Q F3
233(pa)3.328 E -.1(ge)-.1 G(size).1 E F0(ar)3.329 E .829
234(gument is the size, in bytes, of the pages into which the \214le is brok)-.18
235F .829(en up.)-.1 F(The)5.829 E F3(maxcac)3.329 E(he)-.15 E F0(ar)108 535.2 Q
236.153(gument is the maximum number of pages from the underlying \214le to cache\
237 at an)-.18 F 2.653(yo)-.15 G .153(ne time.)451.308 535.2 R .153(This v)5.153 F
238.153(alue is)-.25 F .099(not relati)108 547.2 R .399 -.15(ve t)-.25 H 2.599(ot)
239.15 G .099(he number of processes which share a \214le')168.727 547.2 R 2.6(sb)
240-.55 G(uf)350.39 547.2 Q .1(fers, b)-.25 F .1(ut will be the lar)-.2 F .1
241(gest v)-.18 F .1(alue speci\214ed by)-.25 F(an)108 559.2 Q 2.5(yo)-.15 G 2.5
242(ft)129.79 559.2 S(he processes sharing the \214le.)138.4 559.2 Q(The)108 576 Q
243F3(mpool_\214lter)3.254 E F0 .754(function is intended to mak)3.254 F 3.254(et)
244-.1 G .754(ransparent input and output processing of the pages possi-)301.778
245576 R 3.095(ble. If)108 588 R(the)3.095 E F3(pgin)3.095 E F0 .596
246(function is speci\214ed, it is called each time a b)3.095 F(uf)-.2 E .596
247(fer is read into the memory pool from the)-.25 F .125(backing \214le.)108 600
248R .125(If the)5.125 F F3(pgout)2.625 E F0 .125
249(function is speci\214ed, it is called each time a b)2.625 F(uf)-.2 E .125
250(fer is written into the backing \214le.)-.25 F .276
251(Both functions are are called with the)108 612 R F3(pgcookie)2.777 E F0
252(pointer)2.777 E 2.777(,t)-.4 G .277
253(he page number and a pointer to the page to being)337.27 612 R
254(read or written.)108 624 Q .124(The function)108 640.8 R F3(mpool_ne)2.624 E
255(w)-.15 E F0(tak)2.624 E .123(es an MPOOL pointer and an address as ar)-.1 F
2562.623(guments. If)-.18 F 2.623(an)2.623 G .623 -.25(ew p)457.568 640.8 T .123
257(age can be allo-).25 F .944(cated, a pointer to the page is returned and the \
258page number is stored into the)108 652.8 R F3(pgnoaddr)3.445 E F0 3.445
259(address. Other)3.445 F(-)-.2 E(wise, NULL is returned and errno is set.)108
260664.8 Q 1.167(The function)108 681.6 R F3(mpool_g)3.667 E(et)-.1 E F0(tak)3.667
261E 1.167(es a MPOOL pointer and a page number as ar)-.1 F 3.666(guments. If)-.18
262F 1.166(the page e)3.666 F 1.166(xists, a)-.15 F .686
263(pointer to the page is returned.)108 693.6 R .687
264(Otherwise, NULL is returned and errno is set.)5.686 F .687
9ac3792a
AM
265(The \215ags parameter is not)5.687 F(4.4 Berk)72 732 Q(ele)-.1 E 2.5(yD)-.15 G
266(istrib)132.57 732 Q 104.595(ution June)-.2 F(4, 1993)2.5 E(1)535 732 Q EP
fdeaf90b
RG
267%%Page: 2 2
268%%BeginPageSetup
269BP
270%%EndPageSetup
9ac3792a
AM
271/F0 10/Times-Roman@0 SF 129.01(MPOOL\(3\) BSD)72 48 R(Programmer')2.5 E 2.5(sM)
272-.55 G 129.01(anual MPOOL\(3\))340.17 48 R(currently used.)108 84 Q 1.463
273(The function)108 100.8 R/F1 10/Times-Italic@0 SF(mpool_put)3.963 E F0 1.462
274(unpins the page referenced by)3.962 F F1(pgaddr)3.962 E F0(.).73 E F1(Pgaddr)
2756.462 E F0 1.462(must be an address pre)3.962 F(viously)-.25 E(returned by)108
276112.8 Q F1(mpool_g)2.5 E(et)-.1 E F0(or)2.5 E F1(mpool_ne)2.5 E(w)-.15 E F0 5
277(.T).31 G(he \215ag v)271.65 112.8 Q(alue is speci\214ed by)-.25 E F1(or)2.5 E
278F0('ing an).73 E 2.5(yo)-.15 G 2.5(ft)434.74 112.8 S(he follo)443.35 112.8 Q
279(wing v)-.25 E(alues:)-.25 E(MPOOL_DIR)108 129.6 Q(TY)-.6 E
fdeaf90b 280(The page has been modi\214ed and needs to be written to the backing \214le.)
9ac3792a 281144 141.6 Q F1(Mpool_put)108 158.4 Q F0
fdeaf90b 282(returns 0 on success and -1 if an error occurs.)2.5 E .247(The function)108
9ac3792a
AM
283175.2 R F1(mpool_sync)2.747 E F0 .247(writes all modi\214ed pages associated w\
284ith the MPOOL pointer to the backing \214le.)2.747 F F1(Mpool_sync)108 187.2 Q
285F0(returns 0 on success and -1 if an error occurs.)2.5 E(The)108 204 Q F1
fdeaf90b 286(mpool_close)2.698 E F0 .198(function free')2.698 F 2.698(su)-.55 G 2.698(pa)
9ac3792a 287245.432 204 S .498 -.15(ny a)257.57 204 T .198
fdeaf90b 288(llocated memory associated with the memory pool cookie.).15 F(Modi-)5.197 E
9ac3792a 289(\214ed pages are)108 216 Q/F2 10/Times-Bold@0 SF(not)2.5 E F0
fdeaf90b
RG
290(written to the backing \214le.)2.5 E F1(Mpool_close)5 E F0
291(returns 0 on success and -1 if an error occurs.)2.5 E/F3 9/Times-Bold@0 SF
9ac3792a 292(ERR)72 232.8 Q(ORS)-.27 E F0(The)108 244.8 Q F1(mpool_open)2.938 E F0 .438
fdeaf90b 293(function may f)2.938 F .438(ail and set)-.1 F F1(errno)2.938 E F0 .438(for an)
9ac3792a
AM
2942.938 F 2.938(yo)-.15 G 2.938(ft)344.87 244.8 S .439
295(he errors speci\214ed for the library routine)353.918 244.8 R F1(mal-)2.939 E
296(loc)108 256.8 Q F0(\(3\).).31 E(The)108 273.6 Q F1(mpool_g)2.5 E(et)-.1 E F0
fdeaf90b 297(function may f)2.5 E(ail and set)-.1 E F1(errno)2.5 E F0(for the follo)2.5 E
9ac3792a
AM
298(wing:)-.25 E([EINV)108 290.4 Q 29.98(AL] The)-1.35 F(requested record doesn')
2992.5 E 2.5(te)-.18 G(xist.)305.96 290.4 Q(The)108 307.2 Q F1(mpool_ne)4.073 E(w)
fdeaf90b
RG
300-.15 E F0(and)4.073 E F1(mpool_g)4.073 E(et)-.1 E F0 1.573(functions may f)
3014.073 F 1.573(ail and set)-.1 F F1(errno)4.073 E F0 1.573(for an)4.073 F 4.073
9ac3792a
AM
302(yo)-.15 G 4.073(ft)421.336 307.2 S 1.573(he errors speci\214ed for the)431.519
303307.2 R(library routines)108 319.2 Q F1 -.37(re)2.5 G(ad).37 E F0(\(2\)).77 E
304F1 2.5(,w).54 G(rite)214.48 319.2 Q F0(\(2\)).18 E F1(,).54 E F0(and)2.5 E F1
305(malloc)2.5 E F0(\(3\).).31 E(The)108 336 Q F1(mpool_sync)4.287 E F0 1.787
fdeaf90b 306(function may f)4.287 F 1.787(ail and set)-.1 F F1(errno)4.288 E F0 1.788
9ac3792a
AM
307(for an)4.288 F 4.288(yo)-.15 G 4.288(ft)356.694 336 S 1.788
308(he errors speci\214ed for the library routine)367.092 336 R F1(write)108 348 Q
309F0(\(2\).).18 E(The)108 364.8 Q F1(mpool_close)4.125 E F0 1.624(function may f)
3104.125 F 1.624(ail and set)-.1 F F1(errno)4.124 E F0 1.624(for an)4.124 F 4.124
311(yo)-.15 G 4.124(ft)357.842 364.8 S 1.624
312(he errors speci\214ed for the library routine)368.076 364.8 R F1(fr)108 376.8
313Q(ee)-.37 E F0(\(3\).).18 E F3(SEE ALSO)72 393.6 Q F1(dbopen)108 405.6 Q F0
fdeaf90b 314(\(3\),).24 E F1(btr)2.5 E(ee)-.37 E F0(\(3\),).18 E F1(hash)2.5 E F0(\(3\),)
9ac3792a
AM
315.28 E F1 -.37(re)2.5 G(cno).37 E F0(\(3\)).18 E(4.4 Berk)72 732 Q(ele)-.1 E 2.5
316(yD)-.15 G(istrib)132.57 732 Q 104.595(ution June)-.2 F(4, 1993)2.5 E(2)535 732
317Q EP
fdeaf90b
RG
318%%Trailer
319end
320%%EOF