From: katsu@sran14.sra.co.jp (WATANABE katsuhiro)
Newsgroups: fj.os.386bsd,fj.unix,fj.questions.unix
Subject: Re: How can I run a program with very large virtual memory?
Date: 11 Jan 93 00:15:10 GMT
	<MASAKI-O.92Dec5141843@twoheaded.cs.uec.ac.jp>
Followup-To: fj.os.386bsd
Distribution: fj
Organization: Software Research Associates, Inc.,Japan
In-reply-to: mhiroshi@tansei.cc.u-tokyo.ac.jp's message of 4 Dec 92 04:27:42 GMT

$B!J(BFollowup-To: $B$KCm0U!K(B
$B!!%U%)%m!<$NCY$5$J$i$P(B *.jp $B$G==;X$K$O(B$B$$$k$G$"$m$&EOn4!w#S#R#A$G$9!#(B

$B5-;v(B <3615@tansei1.tansei.cc.u-tokyo.ac.jp> $B$G(B
mhiroshi@tansei.cc.u-tokyo.ac.jp (H. Murakami) $B$5$s$$$O$/(B

> IBM 386BSD0.1 $B$G%9%o%C%W$r%&%s$HBg$-$/@Z$C$F(B,
> $BBg$-$J2>A[%a%b(B$B%j!<$r;H$&7W;;$,$7$?$$$N$G$9(B.

> /usr/src/sys.386bsd/i386/include $B$N2<$K(B
> vmparam.h $B$H$$$&%U%!%$%k$,(B$B$"$j(B,
> $B$=$3$K(B /* Virtual memory related constants, all in bytes. */
> $B$H$"$j(B,
> 
> #define MAXDSIZ  (32*1024*1024) /* max data size */

> $B$J$I$H$J$C$F$$$k$H$3$m$r(B, $BNc$($P(B swap area $B$r(B 1GB $B<h$C$F$*$$$F$+(B$B$i(B,

> ! #define MAXDSIZ  (999*1024*1024) /* max data size */

> $B$NMM$KJQ$($F8+$?$i(B, $BAv$k$h$&$K$O$J$C(B$B$?$N$G$9$,(B, $BESCf$G(B, $B%-!<F~NO$,(B
> $B<u$1IU$1$i$l$J$/$J$j(B, panic $B$r(B $B5/$3$7$F%7%9%F%`$,Mn$A$^$7$?(B.

$B!!(B386BSD $B$O%m%0%$%s%W%m%s%W%H$,=P$F$$$k=j$7$+8+$?$3$H$J$$$N$G$9$,!"(B
$B$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B
MAXDSIZ $B$NCM$HHf$Y$F(B swap map $B$,%+%P!<$9$kBg$-$5$,(B$BITI,MW$KBg$-$/(B
$B$J$i$J$$$h$&$K!"$"$k$$$O8@$$49$($l$P!"ITI,MW$KBg$-$J%V%m%C%/%5%$%:$G(B
$B%9%o%C%WNN0h$,3d$j(B$BEv$F$i$l$k$N$rHr$1$k$?$a$K!"(BDMMAX $B$h$j>.$5$$E,Ev$J(B
$BCM$,@_Dj$5$l$k$3$H$,$"$j$^$9!#(B
$B!!$D$^$j!"(BDMMAX $B$OBg(B$B$-$a$K$7$F$*$$$F$b(B dmmax $B$K@_Dj$9$k$H$-$KE,Ev$J(B
$BCM$K@Z$j5M$a$i$l$^$9$+$i!"?@7P<A$K@53N$K7W;;$9$kI,MW$,(B$B$J$$$H$$$($^$9!#(B

$B!!$J$*!">e$N@)Ls$OI,MW>r7o$N0l$D$K2a$.$:!"$3$l$5$(K~$?$;$P$&$^$/$$$/(B
$B$H$$$&==J,>r7o(B$B$G$O$J$$$+$b$7$l$^$;$s!#(B
$B!!$H$K$+$/0lEY(B maxdmap $B$rD4$Y$F$_$F$/$@$5$$!#(B


$B!!:G8e$K!"K\Bj$H$OL54X78$G$9(B$B$,!"(B
> panic $B$r(B $B5/$3$7$F%7%9%F%`$,Mn$A$^$7$?(B.
$B$H$$$&>l9g$O!"(Btraceback $B$NFbMF$N35N,$r5-$7$F$*$/$H!"5DO@(B$B$,0lAX(B
$BH/E8$7$d$9$/$J$k$H;W$$$^$9$h!#!J(B386BSD $B$K$O(B traceback $B$,$J$$$N$+$J!)!K(B


$B;29MJ88%(B
[1] Leffler S.J., M.K.McKusick, M.J.Karels, and J.S.Quarterman,
"The Design and Implementation of the 4.3BSD UNIX Operating System",
Addison-Wesley, Reading, MA, 1989, ISBN 0-201-06196-1.
($BK]Lu(B:$BCfB<L@(B,$BAjED?N(B,$B7W1'@8(B,$B>.CSHFJ?(B,$B!V(BUNIX 4.3BSD$B$N@_7W$H<BAu!W(B,$B4]A1(B,
1991$BG/(B,ISBN 4-621-03607-6)
$B%W%m%;%9$4$H$N(B swap map $B$K$D$$(B$B$F$O!"(B5.6 Per-Process Resources $B$N>O!#(B

--
$BEOn49n9(!w#S#R#A%=%U%H%&%'%"9)3X8&5f=j(B
Newsgroups: fj.os.386bsd