锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美日韩国产高清,色播视频在线观看,fc2人成共享视频在线观看http://www.aygfsteel.com/howard-he/zh-cnWed, 18 Jun 2025 09:32:43 GMTWed, 18 Jun 2025 09:32:43 GMT60JVM鍐呭瓨綆$悊-----鍫嗗唴瀛?/title><link>http://www.aygfsteel.com/howard-he/archive/2011/05/21/jvm-heap.html</link><dc:creator>璐烘枌</dc:creator><author>璐烘枌</author><pubDate>Sat, 21 May 2011 01:42:00 GMT</pubDate><guid>http://www.aygfsteel.com/howard-he/archive/2011/05/21/jvm-heap.html</guid><wfw:comment>http://www.aygfsteel.com/howard-he/comments/350725.html</wfw:comment><comments>http://www.aygfsteel.com/howard-he/archive/2011/05/21/jvm-heap.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/howard-he/comments/commentRss/350725.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/howard-he/services/trackbacks/350725.html</trackback:ping><description><![CDATA[<div>Heap鍫嗗唴瀛樼悊瑙?br /><br />涓涓狫VM瀹炰緥鍙湁涓涓爢鍐呭瓨錛屽爢鍐呭瓨鐨勫ぇ灝忔槸鍙互璋冭妭鐨勩傜被鍔犺澆鍣ㄨ鍙栫被鏂囦歡鍚庯紝闇瑕佹妸綾繪枃浠躲佹柟娉曘佸父閲忔斁鍏ュ埌鍫嗗唴瀛樹腑錛屼互渚挎墽琛屽櫒鎵ц錛屽爢鍐呭瓨鍒嗕負(fù)涓夐儴鍒嗭細(xì)<br /><br />1. Permanent Space 姘鎬箙瀛樺偍鍖? <p>姘鎬箙瀛樺偍鍖烘槸涓涓父椹誨唴瀛樺尯鍩燂紝鐢ㄤ簬瀛樻斁<span>JDK鑷韓鎵鎼哄甫鐨凜lass,Interface鐨勫厓鏁版嵁錛屼篃灝辨槸璇村畠瀛樺偍鐨勬槸榪愯鐜蹇呴』鐨勭被淇℃伅錛岃瑁呰澆榪涙鍖哄煙鐨勬暟鎹槸涓嶄細(xì)琚瀮鍦懼洖鏀跺櫒鍥炴敹鎺夌殑錛屽叧闂璊VM鎵嶄細(xì)閲婃斁姝ゅ尯鍩熸墍鍗犵敤鐨勫唴瀛樸?/span><br />2.Young Generation Space 鏂扮敓鍖?br /><span>鏂扮敓鍖烘槸綾葷殑璇炵敓銆佹垚闀褲佹秷浜$殑鍖哄煙錛屼竴涓被鍦ㄨ繖閲屼駭鐢燂紝搴旂敤錛屾渶鍚庤鍨冨溇鍥炴敹鍣ㄦ敹闆嗭紝緇撴潫鐢熷懡銆?br />鏂扮敓鍖哄張鍒嗕負(fù)涓ら儴鍒嗭細(xì)浼婄敻鍖猴紙<span lang="EN-US">Eden space</span>錛夊拰騫稿瓨鑰呭尯錛?span lang="EN-US">Survivor pace</span>錛夈?br />鎵鏈夌殑綾婚兘鏄湪浼婄敻鍖鴻<span lang="EN-US">new</span>鍑烘潵鐨勩傚垢瀛樺尯鏈変袱涓細(xì)<span lang="EN-US"> 0</span>鍖猴紙<span lang="EN-US">Survivor 0 space</span>錛夊拰<span lang="EN-US">1</span>鍖猴紙<span lang="EN-US">Survivor 1 space</span>錛夈傚綋浼婄敻鍥殑絀洪棿鐢ㄥ畬鏃訛紝紼嬪簭鍙堥渶瑕佸垱寤哄璞★紝<span lang="EN-US">JVM</span>鐨勫瀮鍦懼洖鏀跺櫒灝嗗浼婄敻鍥尯榪涜鍨冨溇鍥炴敹錛屽皢浼婄敻鍥尯涓殑涓嶅啀琚叾浠栧璞℃墍寮曠敤鐨勫璞¤繘琛岄攢姣併傜劧鍚庡皢浼婄敻鍥腑鐨勫墿浣欏璞$Щ鍔ㄥ埌騫稿瓨<span lang="EN-US">0</span>鍖恒傝嫢騫稿瓨<span lang="EN-US">0</span>鍖轟篃婊′簡錛屽啀瀵硅鍖鴻繘琛屽瀮鍦懼洖鏀訛紝鐒跺悗縐誨姩鍒?span lang="EN-US">1</span>鍖恒傞偅濡傛灉<span lang="EN-US">1</span>鍖轟篃婊′簡鍛紵鍐嶇Щ鍔ㄥ埌鍏昏佸尯銆?/span><br />3. Tenure Generation Space 鍏昏佸尯<br /><span>鍏昏佸尯鐢ㄤ簬淇濆瓨浠庢柊鐢熷尯絳涢夊嚭鏉ョ殑<span lang="EN-US">JAVA</span>瀵硅薄錛屼竴鑸睜瀵硅薄閮藉湪榪欎釜鍖哄煙媧昏穬銆?span lang="EN-US"><span> </span></span>涓変釜鍖虹殑紺烘剰鍥懼涓嬶細(xì)</span><br /><img border="0" alt="" src="http://www.aygfsteel.com/images/blogjava_net/howard-he/e1476bc8-85c2-36ba-9e47-77d34361f097.jpg" width="450" height="346" /><br /><br /></p></div><img src ="http://www.aygfsteel.com/howard-he/aggbug/350725.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/howard-he/" target="_blank">璐烘枌</a> 2011-05-21 09:42 <a href="http://www.aygfsteel.com/howard-he/archive/2011/05/21/jvm-heap.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>JVM鍐呭瓨綆$悊------鏍堝唴瀛?/title><link>http://www.aygfsteel.com/howard-he/archive/2011/05/20/jvm-stack.html</link><dc:creator>璐烘枌</dc:creator><author>璐烘枌</author><pubDate>Fri, 20 May 2011 14:14:00 GMT</pubDate><guid>http://www.aygfsteel.com/howard-he/archive/2011/05/20/jvm-stack.html</guid><wfw:comment>http://www.aygfsteel.com/howard-he/comments/350712.html</wfw:comment><comments>http://www.aygfsteel.com/howard-he/archive/2011/05/20/jvm-stack.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/howard-he/comments/commentRss/350712.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/howard-he/services/trackbacks/350712.html</trackback:ping><description><![CDATA[<div>鏈瘒瀛︿範(fàn)鏍堝唴瀛樺熀鏈煡璇?闄勪笂JAVA浠g爜 <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080"> 1</span><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #0000ff">package</span><span style="color: #000000"> com.howard.jvm;<br /></span><span style="color: #008080"> 2</span><span style="color: #000000"><img id="Codehighlighter1_24_490_Open_Image" onclick="this.style.display='none'; Codehighlighter1_24_490_Open_Text.style.display='none'; Codehighlighter1_24_490_Closed_Image.style.display='inline'; Codehighlighter1_24_490_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_24_490_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_24_490_Closed_Text.style.display='none'; Codehighlighter1_24_490_Open_Image.style.display='inline'; Codehighlighter1_24_490_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_24_490_Closed_Text">/** */</span><span id="Codehighlighter1_24_490_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /></span><span style="color: #008080"> 3</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * JAVA鐨勫唴瀛樼鐞?nbsp;錛堜竴錛?nbsp;鏍堝唴瀛?br /></span><span style="color: #008080"> 4</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * Stack鏍?nbsp;鏍堝唴瀛?nbsp; JAVA紼嬪簭鐨勮繍琛屽尯銆?nbsp;鏄湪綰跨▼鍒涘緩鏃跺垱寤?瀹冪殑鐢熷懡鍛ㄦ湡鏄窡闅忕嚎紼嬬殑鐢熷懡鍛ㄦ湡錛岀嚎紼嬬粨鏉熸爤鍐呭瓨涔熷氨閲婃斁錛屽浜庢爤鏉ヨ涓嶅瓨鍦ㄥ瀮鍦懼洖鏀墮棶棰?br /></span><span style="color: #008080"> 5</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * 鍙綰跨▼涓緇撴潫錛岃鏍堝氨O(jiān)ver銆?br /></span><span style="color: #008080"> 6</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * 鏍堜腑鐨勬暟鎹兘鏄互鏍堝撫錛圫tack Frame錛夌殑鏍煎紡瀛樺湪錛屾爤甯ф槸涓涓唴瀛樺尯鍧楋紝鏄竴涓暟鎹泦錛屾槸涓涓湁鍏蟲柟娉曪紙Method)鍜岃繍琛屾湡鏁版嵁鐨勬暟鎹泦錛屽綋涓涓柟娉?br /></span><span style="color: #008080"> 7</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * A琚皟鐢ㄦ椂灝變駭鐢熶簡涓涓爤甯1錛屽茍鍘嬪叆鍒版爤涓紝A鏂規(guī)硶鍙堣皟鐢˙鏂規(guī)硶錛屼簬鏄駭鐢熸爤甯2涔熻鍘嬪叆鏍堬紝鎵ц瀹屾瘯鍚庯紝鍏堝脊鍑篎2鏍堝撫錛岀劧鍚庡啀寮瑰嚭F1鏍堝撫錛岄伒寰?#8220;<br /></span><span style="color: #008080"> 8</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * 鍚庤繘鍏堝嚭”鐨勫師鍒欍?br /></span><span style="color: #008080"> 9</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * 鏍堝撫涓富瑕佷繚瀛?綾繪暟鎹細(xì)<br /></span><span style="color: #008080">10</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * 1. 鏈湴鍙橀噺錛坙ocal Variables錛夛紝鍖呮嫭杈撳叆鍙傛暟鍜岃緭鍑哄弬鏁頒互鍙婃柟娉曞唴鍙橀噺錛?br /></span><span style="color: #008080">11</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * 2. 鏍堟搷浣滐紙Operand Stack錛夛紝璁板綍鍏ユ爤鍜屽嚭鏍堟搷浣滐紱<br /></span><span style="color: #008080">12</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * 3. 鏍堝撫鏁版嵁錛團(tuán)rame Data錛夛紝鍖呮嫭綾繪枃浠躲佹柟娉曠瓑絳夈?br /></span><span style="color: #008080">13</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> *<br /></span><span style="color: #008080">14</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> * </span><span style="color: #808080">@author</span><span style="color: #008000"> Administrator<br /></span><span style="color: #008080">15</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /> *<br /></span><span style="color: #008080">16</span><span style="color: #008000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" /> </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /></span><span style="color: #008080">17</span><span style="color: #000000"><img id="Codehighlighter1_517_985_Open_Image" onclick="this.style.display='none'; Codehighlighter1_517_985_Open_Text.style.display='none'; Codehighlighter1_517_985_Closed_Image.style.display='inline'; Codehighlighter1_517_985_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_517_985_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_517_985_Closed_Text.style.display='none'; Codehighlighter1_517_985_Open_Image.style.display='inline'; Codehighlighter1_517_985_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> StackMemory </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_517_985_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_517_985_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080">18</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /></span><span style="color: #008080">19</span><span style="color: #000000"><img id="Codehighlighter1_543_693_Open_Image" onclick="this.style.display='none'; Codehighlighter1_543_693_Open_Text.style.display='none'; Codehighlighter1_543_693_Closed_Image.style.display='inline'; Codehighlighter1_543_693_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_543_693_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_543_693_Closed_Text.style.display='none'; Codehighlighter1_543_693_Open_Image.style.display='inline'; Codehighlighter1_543_693_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> methodA() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_543_693_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_543_693_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080">20</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">浜х敓涓涓爤甯1</span><span style="color: #000000">"</span><span style="color: #000000">);<br /></span><span style="color: #008080">21</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000">;<br /></span><span style="color: #008080">22</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">鍙橀噺i 鏀懼叆鍒版爤甯1涓?/span><span style="color: #000000">"</span><span style="color: #000000">);<br /></span><span style="color: #008080">23</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">鍑嗗浜х敓涓涓爤甯2</span><span style="color: #000000">"</span><span style="color: #000000">);<br /></span><span style="color: #008080">24</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        methodB(</span><span style="color: #000000">"</span><span style="color: #000000">hello world</span><span style="color: #000000">"</span><span style="color: #000000">);<br /></span><span style="color: #008080">25</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080">26</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /></span><span style="color: #008080">27</span><span style="color: #000000"><img id="Codehighlighter1_731_830_Open_Image" onclick="this.style.display='none'; Codehighlighter1_731_830_Open_Text.style.display='none'; Codehighlighter1_731_830_Closed_Image.style.display='inline'; Codehighlighter1_731_830_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_731_830_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_731_830_Closed_Text.style.display='none'; Codehighlighter1_731_830_Open_Image.style.display='inline'; Codehighlighter1_731_830_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> String methodB(String arg) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_731_830_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_731_830_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080">28</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">浜х敓涓涓爤甯2</span><span style="color: #000000">"</span><span style="color: #000000">);<br /></span><span style="color: #008080">29</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">鍙傛暟arg 鍜?nbsp;鏂規(guī)硶榪斿洖鍊?nbsp;鏀懼叆鍒版爤甯2涓?/span><span style="color: #000000">"</span><span style="color: #000000">);<br /></span><span style="color: #008080">30</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> arg;<br /></span><span style="color: #008080">31</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080">32</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /></span><span style="color: #008080">33</span><span style="color: #000000"><img id="Codehighlighter1_873_982_Open_Image" onclick="this.style.display='none'; Codehighlighter1_873_982_Open_Text.style.display='none'; Codehighlighter1_873_982_Closed_Image.style.display='inline'; Codehighlighter1_873_982_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_873_982_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_873_982_Closed_Text.style.display='none'; Codehighlighter1_873_982_Open_Image.style.display='inline'; Codehighlighter1_873_982_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> main(String[] args) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_873_982_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_873_982_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080">34</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        StackMemory sm </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> StackMemory();<br /></span><span style="color: #008080">35</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">鍑嗗浜х敓涓涓爤甯1,鍥犱負(fù)灝嗚璋冪敤methodA鏂規(guī)硶</span><span style="color: #000000">"</span><span style="color: #000000">);<br /></span><span style="color: #008080">36</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        sm.methodA();<br /></span><span style="color: #008080">37</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080">38</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /></span><span style="color: #008080">39</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000"><br /></span><span style="color: #008080">40</span><span style="color: #000000"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span></div><br /><br /><br /></div><img src ="http://www.aygfsteel.com/howard-he/aggbug/350712.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/howard-he/" target="_blank">璐烘枌</a> 2011-05-20 22:14 <a href="http://www.aygfsteel.com/howard-he/archive/2011/05/20/jvm-stack.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>mysql 闆嗙兢 jdbc閰嶇疆http://www.aygfsteel.com/howard-he/archive/2011/05/17/mysql--jdbc.html璐烘枌璐烘枌Tue, 17 May 2011 05:19:00 GMThttp://www.aygfsteel.com/howard-he/archive/2011/05/17/mysql--jdbc.htmlhttp://www.aygfsteel.com/howard-he/comments/350390.htmlhttp://www.aygfsteel.com/howard-he/archive/2011/05/17/mysql--jdbc.html#Feedback0http://www.aygfsteel.com/howard-he/comments/commentRss/350390.htmlhttp://www.aygfsteel.com/howard-he/services/trackbacks/350390.html闃呰鍏ㄦ枃

璐烘枌 2011-05-17 13:19 鍙戣〃璇勮
]]>
mysql 涓諱粠澶嶅埗 璇誨啓鍒嗙閰嶇疆http://www.aygfsteel.com/howard-he/archive/2011/05/17/mysql.html璐烘枌璐烘枌Tue, 17 May 2011 03:02:00 GMThttp://www.aygfsteel.com/howard-he/archive/2011/05/17/mysql.htmlhttp://www.aygfsteel.com/howard-he/comments/350380.htmlhttp://www.aygfsteel.com/howard-he/archive/2011/05/17/mysql.html#Feedback0http://www.aygfsteel.com/howard-he/comments/commentRss/350380.htmlhttp://www.aygfsteel.com/howard-he/services/trackbacks/350380.html鍙f按錛氱涓嬈″啓鍗氬錛屾榪庡ぇ瀹舵潵鎷嶇爾銆?br />鏈榪戦」鐩腑鐢╩ysql涓諱粠澶嶅埗涓昏鏄負(fù)浜嗗疄鐜拌鍐欏垎紱匯佹暟鎹簱澶囦喚銆佹晠闅滆漿縐葷殑闇瑕侊紝閲囩敤鐨勬槸涓涓諱竴浠庯紝閰嶇疆姣旇緝綆鍗曘?br />鑷凡鍦ㄦ湰鏈哄仛嫻嬭瘯
嫻嬭瘯鐜濡備笅錛?br />OS錛歸in7
mysql: 瀹夎涓や釜鐗堟湰鐨刴ysql 錛屼竴涓槸5.5.x(楂樼増鏈仛涓伙級 涓涓槸5.1.x.(浠庯級

閰嶇疆鏂囦歡 win涓媘y.ini  linux涓嬶細(xì)my.conf

1. 閰嶇疆涓誨簱

#閰嶇疆涓諱粠鏁版嵁搴?br />server-id=1
#涓諱粠澶嶅埗鏄氳繃浜岃繘鍒舵枃浠舵潵榪涜錛屾墍浠ヨ寮鍚棩蹇楀姛鑳?br />log-bin=mysql-bin
#涓繪満錛岃鍐欓兘鍙互
read-only=0
#闇瑕佸浠芥暟鎹紝澶氫釜鍐欏琛?br />binlog-do-db=core
#涓嶉渶瑕佸浠界殑鏁版嵁搴擄紝澶氫釜鍐欏琛?br />binlog-ignore-db=test
binlog-ignore-db=mysql

2. 閰嶇疆浠庡簱

#涓諱粠閰嶇疆
server-id=2
log-bin=mysql-bin
#涓繪満鍦板潃
master-host=127.0.0.1
master-user=slave1
master-password=slave1
master-port=3309
#濡傛灉浠庢湇鍔″櫒鍙戠幇涓繪湇鍔″櫒鏂帀錛岄噸鏂拌繛鎺ョ殑鏃墮棿宸?縐?
master-connect-retry=60
#鍙鍒舵煇涓簱
replicate-do-db=core
#涓嶅鍒舵煇涓簱
replicate-ignore-db=mysql

3. 璁劇疆鏉冮檺
緇欎富鏁版嵁搴撴巿浜堜竴涓彲浠ヨ繘琛屽鍒剁殑鐢ㄦ埛
GRANT replication slave ON *.* TO 'slave1'@'%' IDENTIFIED BY 'slave1';

4. 鍚姩浠庡簱澶嶅埗
mysql>slave start;
myslq>slave stop;

5. 鏌ョ湅澶嶅埗鐘舵?br />涓誨簱錛歮ysql>show master status\G(娉ㄦ剰錛屼笉鐢ㄥ姞鍒嗗彿)
浠庡簱錛歮ysql>show slave status\G

浠庡簱璁劇疆涓誨簱淇℃伅
change master to
> master_host='master_ip',
> master_user='user',
> master_password='pwd',
> master_port=3307,
> master_log_file='mysql-bin.000020',
> master_log_pos=135617781;

6. 瑙e喅鏈悓姝ョ殑鍙兘鍑虹幇鐨勯棶棰?/p>

set GLOBAL SQL_SLAVE_SKIP_COUNTER=1

鍑虹幇榪囩殑闂錛?br />a. character 鐨勯棶棰?鏄痬ysql client鐨勯棶棰橈紝闇瑕佹妸瀹㈡埛绔殑character璁劇疆鍜宻erver 涓鏍?br />
7. 濡傛灉鍑虹幇澶嶅埗閿欒錛屼粠鏈嶅姟鍣ㄧ殑閿欒鏃ュ織錛圚OSTNAME.err錛変腑涔熶細(xì)鍑虹幇閿欒娑堟伅銆?br />

浠ヤ笂閰嶇疆嫻嬭瘯閫氳繃錛屾湁闂?gòu)脾杩庝竴璧鋒潵璁ㄨ


璐烘枌 2011-05-17 11:02 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 西乌珠穆沁旗| 丰台区| 保康县| 沁源县| 松阳县| 阳西县| 赫章县| 三明市| 平谷区| 武宣县| 井陉县| 磐石市| 北安市| 绥芬河市| 冷水江市| 会理县| 汝州市| 阳春市| 大足县| 东乡县| 桦南县| 城固县| 虞城县| 东阳市| 富平县| 荥阳市| 运城市| 忻城县| 柳林县| 阳西县| 西盟| 商城县| 东丰县| 彝良县| 灌云县| 绥宁县| 阿拉尔市| 抚顺县| 定南县| 汶上县| 万源市|