Newsgroups: fj.unix,fj.sys.sun
Path: galaxy.trc.rwcp.or.jp!jaist-news!cs.titech!nirvana.cs.titech!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
From: onoe@sm.sony.co.jp (Atsushi Onoe)
Subject: Re: xy ga memory wo kuu nazo
Message-ID: <CowFC2.4Is@wsservra.sm.sony.co.jp>
Followup-To: fj.unix
Sender: news@wsservra.sm.sony.co.jp (Usenet News System)
Nntp-Posting-Host: onoe4
Organization: Computer Systems Design Dept., BIS, Sony Corporation
References: <2pfjbj$34l@argon.material.tohoku.ac.jp> <2pflat$3qo@argon.material.tohoku.ac.jp> <CouF4K.4wF@wsservra.sm.sony.co.jp>
Date: Wed, 27 Apr 1994 03:36:00 GMT
Lines: 22
Xref: galaxy.trc.rwcp.or.jp fj.unix:4534 fj.sys.sun:5435
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.unix&nb=4534&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

In article <CouF4K.4wF@wsservra.sm.sony.co.jp> michael@sm.sony.co.jp (Michael Knight) writes:
> sfd = open("source", 0);
> saddr = mmap(0, len, PROT_READ, MAP_SHRED, sfd, 0);
> dfd = create("dest", mode);
> ftruncate(dfd, len);
> daddr = mmap(0, len, RROT_WRITE, MAP_PRIVATE, dfd, 0);
> memmove(daddr, saddr, len);

destination $BB&$O(B mmap $B$9$kI,MW$O$"$j$^$;$s!#(B
mmap $BNN0h$N(B write() $B$G=<J,$G$9!#7k9=$o$+$j$K$/$$$1$I!#(B

$B$$$:$l$K$;$h(B read/write $B$KHf$Y$k$H!"(Bkernel -> user, user -> kernel $B$G(B
$B9g7W(B2$B2s$N%3%T!<$,8:$k$N$G!"3N$+$K9bB.$G$9!#(B

$B$G$b(B kernel $B$K$H$C$F$O(B mmap $B$5$l$k$H!"$I$3?($C$F$$$k$+A4A3$o$+$i$J$$$N$G(B
$B4IM}$,BgJQ!#$$$m$$$m$J2>Dj$rCV$$$F9)IW$7$F$$$k$o$1$G$9!#(B

> > $B<B$O6u$-%a%b%j$OHk$+$KA4It%G%#%9%/$N%-%c%C%7%e$K$G$b;H$&;EMM$J$N$+$J!)(B

VM $B$+$i8+$k$HA4$F$N%a%b%j$O%-%c%C%7%e$G$9!#(Btext $B$b(B data $B$b(B file $B$b0l=o!#(B

$BHx>e(B
