锘??xml version="1.0" encoding="utf-8" standalone="yes"?>C++鍗氬-xiaoxiaolinghttp://www.2676208.com/xiaoxiaoling/zh-cnSun, 25 Aug 2019 09:50:51 GMTSun, 25 Aug 2019 09:50:51 GMT60灏?#37719;氬?#24777;鑷矯SDNhttp://www.2676208.com/xiaoxiaoling/archive/2019/01/29/216224.htmlclclclclTue, 29 Jan 2019 02:39:00 GMThttp://www.2676208.com/xiaoxiaoling/archive/2019/01/29/216224.htmlhttp://www.2676208.com/xiaoxiaoling/comments/216224.htmlhttp://www.2676208.com/xiaoxiaoling/archive/2019/01/29/216224.html#Feedback0http://www.2676208.com/xiaoxiaoling/comments/commentRss/216224.htmlhttp://www.2676208.com/xiaoxiaoling/services/trackbacks/216224.html灏?#37719;氬?#24777;鑷矯SDN

clcl 2019-01-29 10:39 鍙戣〃璇勮
]]>
epoll閭d簺浜嬪効http://www.2676208.com/xiaoxiaoling/archive/2018/07/14/215782.htmlclclclclSat, 14 Jul 2018 03:17:00 GMThttp://www.2676208.com/xiaoxiaoling/archive/2018/07/14/215782.htmlhttp://www.2676208.com/xiaoxiaoling/comments/215782.htmlhttp://www.2676208.com/xiaoxiaoling/archive/2018/07/14/215782.html#Feedback0http://www.2676208.com/xiaoxiaoling/comments/commentRss/215782.htmlhttp://www.2676208.com/xiaoxiaoling/services/trackbacks/215782.htmlET鍜孡T:   
   LT涓鑸敤鍦?#37719;?#32510;跨▼銆?/span>
   ET鍜孍POLLONESHOT閰嶅悎?#25956;鍦?#28598;?#32510;跨?#23338;叡浜?#28051;涓猠poll鐜?#28583;?#28051;嬶?#23373;POLLONESHOT鏍囪瑙?#37721;戣?#22249;殑浜嬩欢浠巈poll涓?#32457;?#38340;わ紝涓嬫蹇呴』閲嶆柊娉ㄥ唽?#32029;?#25956;鏉ラ槻姝?#28598;?#32510;跨?#23338;?#23678;椂鍙栧埌鍚?#28051;涓猻ocket?#27537;浜嬩欢浜?#37922;熷啿绐?#37510;?/span>

epoll_wait 绗?#28051;?#28051;?#37721;?#37825;?鍙?#27996;嬩欢鏁?#38322;?#38171;?/span>
   鍗?#32510;跨?#23339;ā鍨嬪綋鐒?#28751;?#37721;兘涓娆?#28598;氬彇涓?#31802;鏁?#37916;囬珮?#32029;澶?#32510;跨▼涓?#27996;嗛槻姝?#28051;涓?#32510;跨?#23339;妸鎵鏈?#27996;嬩欢鍙?#28729;屽叾浠?#32510;跨?#23342;ゥ楗匡紝ACE瀹?#37916;?#37828;?#37721;?#37721;?涓?#37510;?/span>

閿?#29831;?#28598;勭悊锛?/span>
   EAGIN | EINTR | EWOULDBLOCK 閲?#29831;?#37510;?/span>
   EPOLLERR | EPOLLHUP | EPOLLRDHUP 鏂紑杩炴帴銆?/span>

鎯婄兢锛?/span>
   榛樿绯荤粺?#20824;?#32048;鏈?#26473;?#38338;?#26864;橈紝?#23873;璇存柊绯荤粺鏈変慨澶?#28051;?#26473;囪繕鏄?#28598;勭悊涓涓嬫瘮杈冨ソ?#32029;涓鑸?#29785;?#37712;?#37826;?#22935;?#37828;?#37722;屾椂鍙?#37832;?#28051;涓?#32510;跨?#23340;瓑寰卆ccept?#32029;鍙?#28000;?#37719;曠嫭绾跨?#23179;ccept?#32029;灏?#26473;炴帴鍦ㄥ垎缁欏叾浠栧伐浣?#32510;跨▼銆俷ginx鏄?#28598;?#26473;?#32459;嬫ā鍨嬶紝浣跨敤浜嗗熀浜庡叡浜?#37712;呭瓨?#27537;浜?#37826;?#38335;侊紝浣?#23536;?#37722;屾椂鍙?#37832;?#28051;涓伐浣?#26473;?#32459;嬬殑epoll鍚?#37832;塧ccept?#27537;socket?#32029;閫?#26473;囪繖绉嶆柟?#32033;瀹?#37916;?#26473;炴帴鏁?#28051;?#37928;勮礋杞藉?#22250; 锛?#26473;炴帴鏁?#28751;戠殑?#20240;浣?#26473;?#32459;嬪?#26944;埌accept閿佺殑姒?#37916;囬珮锛?#37510;?br />
   涓?#27996;?#38316;?#37711;嶅ぇ鏁版嵁閲廼o?#26882;?#32029;et妯″紡涓?#37721;?#28598;勭悊涓涓猣d,?#21502;浠杅d琚?#26967;?#23005;荤殑鎯?#37712;?#37721;?#37922;?#37510;俵inux寤鸿鍙?#28000;?#37734;╢d鑱?#32495;诲埌?#27537;缁撴瀯锛?#28051;鑸兘?#32048;鑷?#23480;?#28751;?#29761;?#28051;涓寘鍚玣d鍜?#29831;?#37712;欑紦?#21887;?#27537;缁撴?#21226;綋锛?#28051;?#28583;?#37716;爎eady浣嶏紝鐒?#37722;巈poll_wait瑙?#37721;?#27996;嬩欢涔嬪悗浠?#28751;嗗叾?#30086;浣?#28051;簉eady妯?#23534;忥紝鐒?#37722;?#37734;?#28051;?#26440;?#26462;?#29831;eady fd鍒?#29723;?#37510;?/span>


epoll瀹?#37916;?#38171;? 
   epoll鍐呴儴?#25956;浜?#28051;涓?#32510;?#27035;?#37837;戣?#26495;綍娣?#37716;犵殑socket?#32029;?#25956;浜?#28051;涓?#37721;?#37722;戦摼琛ㄦ帴鏀跺唴鏍?#29785;?#37721;戠殑浜嬩欢銆?/span>

   娉ㄥ唽?#27537;浜嬩欢?#23509;杞?#37734;?#32510;?#27035;?#37837;?#28051;?绾?#27035;?#37837;戠殑鎻?#37711;ユ椂闂?#37825;?#37916;?#37828;痩ogN?#32029;?#21502;涓璶涓?#37837;戠殑?#29678;搴?銆?/span>

   ?#23509;杞界殑浜嬩欢?#32048;涓?#29825;?#28598;?缃?#37719;?椹卞姩寤虹?#23338;?#28854;?#20904;叧绯伙紝涔?#28751;?#37828;?#29831;达紝?#32139;?#27977;搴旂殑浜嬩欢鍙?#37922;熸椂?#32048;?#30367;?#25956;杩?#28051;?#37733;炶皟鏂?#23049;?#37510;?#26473;?#28051;?#37733;炶皟鏂?#23049;?#37734;?#37712;?#37837;?#28051;?#37721;玡p_poll_callback,瀹?#28028;氬?#21975;彂鐢熺殑浜嬩欢娣?#37716;犲埌rdlist鍙岄摼琛?#28051;?#37510;?/span>

   浣跨敤mmap鏄?#28751;?#37712;呭瓨?#32029;?#22138;灏?#37712;?#37837;告?#37724;岀敤?#22491;鎬佺殑涓嶅?#23677;?#21613;瓨鍦板潃绌?#38338;存?#30127;礉?#32017;閿銆?/span>姣?#23046;?#23049;ㄥ唽?#26570;?#27537;浜嬩欢?#22476;epoll涓椂?#32029;?#32048;?#22968;fd鎷疯礉杩?#37712;?#37837;革紝閫?#26473;?#37712;?#37837;?#27996;庣敤?#22491;绌?#38338;磎map鍚?#28051;鍧?#37712;呭瓨淇?#29831;?#27996;嗗彧?#32048;鎷疯礉涓娆?#37510;?#38171;?#26473;?#37733;炵殑?#26882;鍊?#28051;?#38343;瑕?#37815;疯礉?#32029;select瑕?#38171;?/span>

   鎵?#29723;宔poll_ctl?#26882;?#32029;闄?#27996;嗘妸socket鏀惧埌绾?#27035;?#37837;?#28051;婏紝杩?#28028;氱粰鍐?#37837;?#28051;?#37826;?#28598;勭悊绋嬪簭娉ㄥ唽涓涓?#37733;炶?#20904;嚱鏁帮紝鍛?#29831;?#37712;?#37837;革紝濡?#37835;?#26473;?#28051;?#37721;?#37836;勭殑涓?#37826;埌浜嗭紝灏辨妸瀹?#37824;惧埌鍑嗗灏?#32513;猯ist?#25724;琛?#38322;?#37510;?#37813;浠ワ紝?#32139;涓涓猻ocket涓?#37832;?#37825;版嵁?#22476;浜嗭紝鍐?#37837;?#37734;ㄦ妸缃?#37719;?#28051;婄殑鏁版嵁copy?#22476;鍐?#37837;?#28051;?#37722;?#28751;辨妸socket鎻?#37711;ュ埌鍑嗗灏?#32513;摼琛?#38322;?#27996;?#37510;傞摼琛?#37721;?#37828;?#38315;?#26473;噈map鏄?#28751;勭殑绌?#38338;达紝鎵浠?#37734;?#28028;?#38315;?#32513;欑敤?#22491;绋嬪簭?#27537;?#26882;鍊?#28051;?#38343;瑕?#28598;嶅埗锛?#26473;?#28052;?#37828;?#28051;?#28000;涔堟瘮select鏁?#37916;囬珮?#27537;鍘熷洜?#32029;epoll_wait杩?#37733;炵殑鍙?#37828;?#28751;?#32513;?#38339;熷?#26955;紝涓?#38343;瑕?#26462;?#29831;?涓?#38343;瑕?#28598;嶅埗瀹屾?#24878;殑浜嬩欢鍒?#29723;紝select?#32029;poll瀹?#37916;?#38343;瑕?#38007;?#23480;?#28051;嶆柇杞?#29831;?#37813;鏈塮d闆嗗悎?#32029;?#27967;?#22476;璁?#28598;?#28751;?#32513;?#38171;?#37510;?/span>

   epoll_wait鏈鍚庝細妫鏌ocket?#32029;濡?#37835;?#37828;?LT?#32029;?#33503;涓?#26473;欎簺socket涓婄‘瀹?#37832;?#37832;?#28598;勭悊?#27537;浜嬩欢?#26882;?#32029;鍙堟妸璇?#37721;?#37836;?#37824;?#37733;炲埌鍒氬?#27693;竻绌虹殑鍑嗗灏?#32513;摼琛?#27996;?#38171;圠T?#30254;ET浣?#37825;堢殑鍘熷洜锛?#37510;?/span>

 

鍙?#29785;侊紝濡?#37835;滄病鏈?#28598;?#38322;忕殑绌?#38338;詫紝鏃?#37825;?#26473;炴帴?#32029;epoll鏁?#37916;?#28051;嶆瘮select?#29678;銆?/span>

娴?#29831;?#37825;版嵁锛?#28000;?#37828;?#37714;氭帴瑙o?#27537;?#26882;鍊欏?#34249;?#22247;?#27697;殑鍙傝冩剰涔夌殑娴?#29831;?#38171;?#38171;? 

   鍚?#37837;风殑鐜?#28583;冿紝echo鏈嶅姟鍣?#23092;嬪苟鍙慽o?#32029;鍗?#32510;跨?#23183;poll qps:45000宸?#37721;籌紝姣?#26473;炴帴/鍗?#32459;?go锛?50000澶氾紝澶?#32510;跨?#23183;poll锛堝紑6涓猠poll?#32029;姣?#28051;猠poll?#32017;8绾跨?#23350;紝涓?#21473;48绾跨?#23350;級锛歲ps 70000澶?#37510;?/span>

 




clcl 2018-07-14 11:17 鍙戣〃璇勮
]]>
tcp/udp?#32029;socket閭d簺浜嬪効http://www.2676208.com/xiaoxiaoling/archive/2018/07/13/215781.htmlclclclclFri, 13 Jul 2018 07:49:00 GMThttp://www.2676208.com/xiaoxiaoling/archive/2018/07/13/215781.htmlhttp://www.2676208.com/xiaoxiaoling/comments/215781.htmlhttp://www.2676208.com/xiaoxiaoling/archive/2018/07/13/215781.html#Feedback0http://www.2676208.com/xiaoxiaoling/comments/commentRss/215781.htmlhttp://www.2676208.com/xiaoxiaoling/services/trackbacks/215781.html姒?#36423;?/strong> 锛?
   tcp鍜寀dp?#32029;杩炴帴鍜屾棤杩炴帴?#20824;鏄?#37719;?#29825;紝鏄叡浜墿?#24714;浠嬭川?#27537;浼?#26440;?#37825;版嵁?#27537;搴旂敤绋嬪簭涔嬮棿?#27537;绾?#28729;?#37510;傞潰鍚戣?#28852;帴?#27537;鍗?#29825;?#32513;存姢浜唖egment?#27537;鐘舵?#37724;屾搴?#37510;?br />
鏁呴殰 :
      榛樿鏃爇eep alive锛?/span>
鎷旂綉绾?#37812;?#29882;?/span>鐢卞櫒宕╂簝锛氬彂閫佺瓒呮椂锛?#38322;嶄紶12娆?#28598;?#32510;??#22414;?#25363;锛?#37722;?#37824;?#23534;冿紝?#24116;鏀剁璇籩rrorno ETIMEOUT?#32029;濡?#37835;滄病鏈?#29831;?#37714;欒?#20346;瓑?#22476;涓?#28051;娆?#37712;?#28598;?#29840;igpipe銆傚鏋?#28051;?#38338;?#29882;?#37922;卞櫒鏃?#23049;?#26462;?#37721;?#37714;?#37722;戞?#24878;鍙戦?ICMP 鐩?#37837;?#28051;?#37832;?#28051;?#37721;?#26440;?#37510;?/span>
绋嬪簭閫鍑?#38171;堝寘鎷?#23445;╂簝锛?#38171;?绋嬪簭閫鍑?#37724;?#23005;?#29999;歌皟?#25956; close鏃?#23049;曞?#21700;垎?#32029;?#20824;?#32048;杩?#37733;濬IN琛ㄧ?#27946;鍑猴紝濡?#37835;?#28051;绔?#38315;鍑猴紝
      鍙?#28051;绔?#38171;?1.绗?#28051;娆?#37712;欏悎娉?#38171;堟帴鏀跺埌fin鍚?#26473;?#37828;兘缁?#32513;?#37721;戦?#37825;版嵁锛?#32471;?#27996;屾鍐欑殑?#26882;鍊?#37721;?#37916;?#26473;炴帴涓嶅瓨鍦紝寰楀埌 RST RESET閿?#29831;? 2.璇荤殑?#26882;鍊?#23536;楀埌 conn reset閿?#29831;紝缁?#32513;?#37712;欏?#27410;SIGPIPE淇?#37721;?#28051;?#23005;紝绋嬪簭閫鍑?#37510;?/span>
涓?#37832;?#28729;?#37832;?#38171;?瀹?#37832;?#37722;?#37827;?#23049;?#38315;?#26473;嘑IN閫氱煡瀵?#37826;癸紝瀵?#37826;?#28028;氱户缁?#38322;嶄紶?#27967;?#22476;timeout銆傚鏋滆?#21614;椂?#22688;瀹?#37832;虹殑涓?#37832;?#38322;嶅惎浜嗭紝姝ゆ椂鏀跺埌閲嶄紶?#27537;涓?#37832;烘病鏈?#26473;炴帴璁板綍?#32029;鍚戞簮杩?#37733;瀝st?#32029;鍙戦佺寰楀埌ECONNRESET閿?#29831;紝濡?#37835;?#37721;戦佺鍦?#29831;?#23536;楀埌 conn reset閿?#29831;紝缁?#32513;?#37712;欏?#27410;SIGPIPE淇?#37721;?#28051;?#23005;紝绋嬪簭閫鍑?#37510;?/span>
?#32017;鍚痥eep alive鎯?#37712;?#28051;嬶細
濡?#37835;?#32459;嬪簭宕╂簝杩?#37733;瀎in ?#32029; 濡?#37835;?#28051;?#37832;?#37721;?#26440;?#28003;?#32459;嬪簭涓嶅瓨鍦?#38171;?#28051;?#37832;?#38322;嶅惎锛夛紝鍒欏?#23941;簲RSt?#32029;婧愮寰楀埌ECONNRESET 閿?#29831;?#37510;?/span>
濡?#37835;?#28725;?#37826;规病鏈夊?#31604;eep alive鍝嶅簲ACK 鎴?#38000;匯ST?#32029;婧愮?#30134;IMEOUT锛?/span>閲?#29831;?娆★紝姣?#23046;?#38338;撮殧75绉掞紝瀹氭椂鍣?灏忔椂瓒呮椂鍚庣殑11.25?#22414;?#25363;锛?/span>浠?#32459;嬪簭鑷?#23480;卞?#27692;績璺?#26473;?#37828;?#36423;?#29781;佺殑銆?/span>

缁嗚妭锛?br />
tcp鍐欐?#23940;綔锛?/span>
?#25956;?#22491;鎬?#37815;疯礉?#22476;鍐?#37837;告?#37712;欑紦?#21887;鍖?#37722;?#26473;?#37733;烇紝鍙?#26473;?#37733;?#37828;?#37828;?#38335;?#29831;?#38171;歴ocket鏃?#37825;堟?#26667;紦?#21887;鍖?#37827;?#37825;?#37510;?#35120;卞搷?#27537;鍥犵礌鏈?#38171;氬彂閫?#32464;?#37721;o紝鎷?#28617;?#32464;?#37721;o紝鍐欑紦?#21887;鍖?#28598;?#28751;忥紝Nagle銆?/span>
tcp鏄?#37819;愰珮?#29995;瀹藉埄?#25956;鐜囩殑鍗?#29825;紝姣?#23046;?#37721;戦佸?#37722;憁ss澶?#28751;忥紝鍚屾椂涓嶈兘澶?#27996;庡绔?#37816;?#28729;氱殑澶?#28751;?#38171;?#37721;戦?#32464;?#37721;?#38171;夛紝tcp鍙?#38000;冭檻浜?#32515;?#32513;?#28051;?#29882;?#37922;卞櫒?#32038;?#21887;鍖鸿?#28751;?#37807;?#37712;?#38171;堜篃鏄痶cp?#27537;闄?#37714;?#38171;?#37813;浠?#37832;?#37815;?#28617;?#32464;?#37721;?#37724;屾參鍚?#37716;?#38171;?#28051;?#27996;嗛槻姝?#32515;?#32513;?#37815;?#28617;?#38171;?#38007;?#23536;嬬殑鍗?#29825;?#38171;?#23011;?#23046;?#37721;戦佺殑涓嶈兘澶?#27996;庡鏂?#37816;?#28729;氱殑锛?#37721;戦?#32464;?#37721;?#38171;?#37724;?#38007;?#23480;?#32513;?#38007;?#23480;?#38340;?#37714;剁殑锛堟嫢濉?#32464;?#37721;?#38171;?#37510;?br />

    

?#21443;鍚?#37716;?#38171;?#28051;?#32017;濮嬫寚鏁?#32510;х殑澧?#37716;?#37815;?#28617;?#32464;?#37721;o紝?#22476;涓涓?#38338;?#38339;鍊?#37722;?#37721;?#37812;?#32510;?#37804;х殑?#32029; 涔嬪悗姣?#23046;?#29906;呮椂?#20824;?#22968;闂?#38339;鍊?#38340;嶄?#24225;埌鍘?#37833;?#28051;鍗?#38171;堝苟涓攔to缈诲嶏紝TCP瓒呮椂璁$畻鏄疪TOx2?#32029;杩?#37837;?#26473;炵画涓?#28051;?#23046;″寘灏?#37721;?#37812;怰TOx8浜嗭紝鍗佸垎鎭?#37804;?/span>锛夛紝鎷?#28617;?#32464;?#37721;?#29825;剧疆涓?閲嶆柊?#32017;濮嬫參鍚?#37716;?#38171;堟寚鏁?#32510;?#28583;?#37716;?#38171;?#37510;?#28051;鍒囬兘鏄?#28051;?#27996;?#29825;?#29882;?#37922;卞櫒鏈夋椂闂?#28598;勭悊绉?#37720;嬬殑?#32038;?#21887;銆?#38171;?#37813;浠?#28051;?#38315;傜敤浜庨?#25120;箒鏂紑杩炴帴?#27537;绉?#37716;?#32515;?#32513;滐紝杩?#28052;?#37828;?#28051;?#28000;涔?#28000;ュ墠?#27537;涓?#26462;藉伐鍏峰紑澶?#37833;cp浼?#26440;?#38315;熷害?#27967;蹇殑鍘熷洜锛?#37510;?/span>

Nagle?#30075;娉?#38171;氱涓娆?#38171;?#23005;ゆ椂?#30149;鏈夌瓑寰卆ck纭?#29825;わ紝绌?#38338;?#26473;炴帴锛?#37721;戦?#28751;忓寘鎴?#37716;燂紝绗?#27996;屾缁?#32513;?#37721;戦?锛氬摢鎬?#37721;戦?#32464;?#37721;o紝鎷?#28617;?#32464;?#37721;i兘寰?#28598;э紝涔嬪墠?#27537;?#23512;?#30149;鏈塧ck纭?#29825;?#28186;?#37827;?#28051;嶈鍙戠洿?#22476;鏀跺埌涔嬪墠?#27537; ack纭?#29825;?#37510;?/span>

shutdown鍜宑lose?#27537;鍖?#37714;?

close鍙?#37828;?#38315;掑噺寮曠敤璁?#37825;帮紝 shutdown?#27537;鍗?#37711;?#38338;?#28028;氬?#21342;?#23942;墍鏈?#37928;勮繘绋?#37510;?/span>

shutdown how=0 鍏?#38338;?#29831;伙紝璇讳細杩?#37733;瀍of
shutdown how=1 鍏?#38338;?#37712;欙紝浠?#28003;?#37712;?#28028;氬嚭閿欙紝灏嗙紦?#21887;鍖虹殑鍙戦?#28729;?#37722;?#28028;氬彂閫乫in琛ㄧ?#28888;病鏈?#37825;版嵁浜嗭紝
鏀跺埌瀵?#37826;?#37721;戦佺殑fin?#32029;recv?#32048;杩?#37733;?銆?/span>
listen ?#27537;绗?#27996;?#28051;?#37721;?#37825;板埗瀹氱殑鏄?#37711;?#26473;炴帴闃熷垪澶?#28751;?#38171;坅ccept锛?br />
time_wait鍜宑lose_wait
time_wait 鍑?#37916;?#37734;?#28051;?#37716;╟lose鏂癸紝涓?#27996;嗛槻姝㈡柊杩炴帴鏀跺埌鏃ч摼?#24116;?#27537;鏁版嵁?#23512;?#32029; 鏁?#38322;忛珮鍙?#28000;?#38315;?#26473;囪?#21095;疆鍐?#37837;?#37721;?#37825;扮緝?#29037;?#26882;闂?#38340;嶄綆鏁板?#38171;?msl锛?#37510;?#37721;?#28000;?#38315;?#26473;?SO_LINGER鍏?#38338;?#37510;?/span>
close_wait 鍑?#37916;?#37734;?#29722;?#37716;╟lose鏂癸紝鏁?#38322;忛珮涓鑸?#37733;?#28051;烘ц兘鎴?#38000;卋ug鍦?#37824;跺埌fin鍚庢病鏈夎皟?#25956;close銆?br />
SO_REUSEADDR
?#25956;浜?#32459;嬪簭宕╂簝鍚?#38322;嶅惎?#32029;瑙?#37712;?#37734;板潃琚?#37719;犵敤闂?#26864;?#38171;坱ime_wait锛夛紝鍙?#28051;涓敤閫?#37828;紑涓?#28051;?#37832;嶅姟?#32029;绗?#28051;涓?#37714;?#28729;氬?#26495;潃?#32029;绗?#27996;?#28051;?#37816;?#28729;欼NADDR_ANY 閫?#38320;?#37734;板潃?#32029;濡?#37835;?#28729;㈡埛绔?#26473;炴帴?#27537;鏄?#37714;?#28729;氬?#26495;潃涓鏍?#28028;氬埌绗?#28051;涓猻ocket涓?#37510;?br />      瀵?#27996;?#32513;?#28729;?#27996;?#37722;?#28051;鍦板潃绔?#37721;?#32513;勫悎涓婄殑UDP socket?#32029;kernel灏?#29831;?#37734;?#28729;?#28000;?#28052;嬮棿骞冲潎?#22414;閰嶆?#36346;埌?#27537;鏁版嵁?#23512;锛涘浜?#32513;?#28729;?#27996;?#37722;?#28051;鍦板潃绔?#37721;?#32513;勫悎涓婄殑TCP鐩戝惉socket?#32029;kernel灏?#29831;?#37734;?#28729;?#28000;?#28052;嬮棿骞冲潎?#22414;閰嶆?#36346;埌鐨勮?#28852;帴璇锋眰锛堣皟?#25956;accept()鏂?#23049;?#37813;寰楀埌?#27537;璇锋眰锛?#37510;?/span>

Nagle鍜屽欢杩焌ck?#27537;闂?#26864;?#38171;?/span>
鍙戦佺鏁版嵁鏈?#37721;戦?#28729;岋紝琚玭agle绂?#23005;?#37721;戦?#38171;?#36423;呴?#33636;瓑寰呮帴鏀剁?#27537;ack?#32029;涔?#28751;?#37828;病鏈?#37832;?#32429;?#29825;ょ殑?#23512;鎵嶅厑璁?#37721;戦?#38171;夛紝姝ゆ椂?#24116;鏀剁ack琚欢杩?#37721;戦?#38171;堝?#23678;湜灏哸ck鍜屾暟?#23873;涓璧?#37721;戦?#37819;愰珮?#29995;瀹藉埄?#25956;鐜?#38171;夎?#37721;戦?#37826;?#37825;版嵁鏈?#37721;戦?#28729;屽鑷存帴鏀剁鏃?#23049;?#37733;?#28598;嶏紝鍙屾柟姝?#38335;?#37510;?/span>
宸?#26473;炴帴?#27537;UDP锛?/span>
tcp?#27537;connect鏄紑濮?#28051;?#23046;?#37819;?#37813;嬶紝灏?#26473;?#32459;嬬殑ip绔?#37721;?#32513;?#28729;氬埌socket?#32029;鑰宐ind鏄?#32513;?#28729;?#37832;?#37734;扮殑ip绔?#37721;?#37510;?/span>
udp?#30149;鏈?#28051;?#23046;?#37819;?#37813;嬶紝connect绾补鏄?#37832;?#37734;?#29723;?#28051;猴紝灏?#26473;?#32459;嬬殑ip绔?#37721;?#32513;?#28729;氬埌socket涓?#37510;?/span>
宸?#26473;炴帴?#27537;udp鍙?#28000;?#28051;嶇敤sendto?#32029;sendto浼氬厛灏唖ocket鍜岀洰?#27537;鍦板潃杩炴帴?#32029;鐒?#37722;?#37721;戦?#37825;版嵁鍚?#37712;嶆柇?#32017;?#32029;鑰屽凡杩炴帴?#27537;宸?#32513;?#32513;?#28729;氬?#26495;潃鍙?#28000;ョ敤write?#32029;鎻愰珮鏁?#37916;?#38171;堣祫鏂?#37828;剧?#28888;?#20635;椂杩炴帴鏂紑鎵?#25956;?#27537;?#26882;闂?#37828;?#28028;?#26440;搖dp鏁版嵁?#27537;涓?#37714;嗕箣涓?#32029;杩?#37828;?#23536;?#37721;?#29785;傜殑锛?#37510;?#23534;?#23005;?#38335;?#29831;殑?#24116;鏀讹紝浣跨敤sendto鍙戦?#28729;岀?#33636;粺灏辨病鏈夎?#26495;綍浜嗭紝搴旂敤绋嬪簭鏃?#23049;曟帴鏀朵?#23338;悗icmp杩?#37733;炵殑閿?#29831;?#37510;?/span>
?#24116;鏀剁宸?#26473;炴帴udp?#27537;濂?#28598;?#38171;?鍙?#28000;?#37837;?#29831;嗗摢涓猻ocket鏄?#37725;?#28051;敤?#22491;?#32029;鍙?#28598;?#26473;?#37721;?#28000;?#37913;?#37719;?#26473;炴帴?#32029;鍐?#37721;?#28051;涓?#37734;?#37826;硅皟?#25956;recvfrom鎸?#28729;氱浉鍚?#37734;板潃?#32048;杩?#37733;濫CONNREFUSED?#32029;鍥?#28051;?#23005;?#26473;炴帴宸?#32513;?#29722;?#32513;?#28729;?#37510;?/span>


clcl 2018-07-13 15:49 鍙戣〃璇勮
]]>
鍒?#29831;哻dnhttp://www.2676208.com/xiaoxiaoling/archive/2018/05/09/215630.htmlclclclclWed, 09 May 2018 15:57:00 GMThttp://www.2676208.com/xiaoxiaoling/archive/2018/05/09/215630.htmlhttp://www.2676208.com/xiaoxiaoling/comments/215630.htmlhttp://www.2676208.com/xiaoxiaoling/archive/2018/05/09/215630.html#Feedback0http://www.2676208.com/xiaoxiaoling/comments/commentRss/215630.htmlhttp://www.2676208.com/xiaoxiaoling/services/trackbacks/215630.html   ?#20240;浣?#28051;婅櫧鐒?#37724;宑dn?#30149;鍏?#32495;?#28003;?#37828;?#37814;鏈?#37826;?#37722;戣繕鏄?#23536;?#28598;氱浉浼?#28052;嬪?#21229;殑?#32029;渚嬪锛氳礋杞藉?#22250; ?#32029;?#32038;?#29928;?#32029;鍒嗗?#20904;?#24549;紝璺?#37922;辩瓑銆?/span>
   cdn绠鍗曠殑璇?#28751;?#37828;?#28051;?#28598;嶆?#20636;殑澶х紦?#29928;?#32029;鐢?#27996;庣洰鏍囩敤?#22491;锛堝寘鎷?#23143;?#37724;岀锛夊箍娉涚?#23384;帴瀵?#38007;?#27996;嗗叾澶嶆潅鎬э紝閬嶅?#20904;?#33007;?#20636;偣澶氬垯闇瑕佸垎娴佽礋杞?#37922;?#38007;?#38007;?#32513;勭?#22263;紝搴旂敤绻?#37833;?#37714;?#38343;瑕佸垎娴佽矾鐢憋紝鎻?#38315;熷垯闇瑕佺紦?#29928;?#32029;绋?#28729;氬垯闇瑕佺?#25118;帶璋冨害?#32029;涓?#27996;?#38315;?#37828;?#37714;?#38343;瑕?#37722;勭?#23942;槧灏?#37510;?/span>
   鐢?#27996;庢帴鍏ラ潰骞?#37724;岀綉缁滅殑澶嶆潅鎬э紝涓?#37721;兘璁?#28729;㈡埛绔?#37929;存帴?#28528;瀵规簮?#32029;浜?#37828;?#28751;?#37832;?#27996;?#28051;?#38338;ㄦ帴鍏?#28729;㈡埛绔?#37928;勮竟缂?#37832;嶅姟鍣?缁勶紝杩欎簺杈?#32514;?#37832;嶅姟鍣?#37724;?#37722;庣鐨勮?#20904;害?#32029;鐩戞帶?#32029;婧?#37832;嶅姟鍣?#38315;氳銆?#37827;?#37906;舵槸?#32038;?#29928;灏?/span>娑?#37721;婂埌鏁版嵁涓鑷存х殑闂?#26864;橈紝鏈绠鍗曠殑灏?#37828;?#37722;勬帴鍏?#32468;?#37928;勮竟缂?#37832;嶅姟鍣?#37734;?#38343;瑕佺殑?#26882;鍊欏埌鍚?#37721;?#37815;?#37721;栵紝鎴?#38000;呮?#23384;?#40511;兘?#27537;浠?#28000;?#28052;嬮棿鍙?#28000;ョ浉浜?#37815;?#37721;栵紝鐢?#38007;?#37722;?#37721;?#29835;冨害鎻愬?#23942;帹閫?#37510;?/span>
   杈?#32514;樻帴鏀跺埌璇锋眰鍚庨?#26663;綋鍏跺啿?#27537;闂?#26864;?#28751;?#37828;?#28725;?#29831;锋?#20636;殑鍐?#28729;?“鍘诲摢鎵?/span>”鍜?#8220;鎬?#28052;?#37720;?/span>”?#32029;鎯?#29781;佺煡閬?#37712;?#28729;圭殑浣嶇疆?#32029;涓鑸紦?#29928;?#27537;瀹?#37916;?#28051;嶅?#26662;箮灏?#37828;粺涓?#22476;涓涓?#37929;綍鏈嶅姟鍣?#37813;撅紝鎴?#38000;呭?#25358;挱鎵鏈?#38007;?#23480;辩煡閬?#37928;勮?#20636;偣闂?#28051;鍦堬紝?#27967;?#29678;鏁堢殑鏂?#23049;?#37828;?#28751;?#29831;锋眰url鍝堝笇鍚庣?#23384;帴鎵惧埌鐩殑鍦板潃?#32029;?#32139;鐒?#37721;?#29781;?#37828;紦?#29928;?#20824;?#32048;杩?#37832;?#28052;?#28751;?#37832;塗TL?#27537;姒?#36423;?#37510;?#8220;鎬?#28052;?#37720;?#8221;?#27537;鏂瑰紡澶氱?#23941;鏍凤紝鐢?#27996;?#27996;?#38001;旂綉web鏈嶅姟灞?#28598;氬熀浜嶥NS鐨勮矾鐢?#28003;跨敤鏈骞?#23049;涳紝缂虹偣鏄?#28729;㈡埛绔?#37724;?#28051;?#32513;?#37904;?#28028;氱紦?#29928;?#32029;鏇存柊闇瑕?#28051;瀹氭椂闂?#37510;侶TTP閲?#28729;氬悜?#32029;URL鏀?#37712;欙紝涔?#37832;夌?#23384;帴鍦?#32515;?#32513;滆澶囪矾鐢卞櫒涓婂仛?#32029;鐩存帴鍦?#29882;?#37922;?#29723;?#28051;?#28103;?#37816;佽矾寰?#37510;?#26473;欎簺鏂?#23049;?#37734;╟dn杩?#28051;?#25652;?#37833;傜殑绯荤粺涓?#37837;规嵁闇瑕?#28003;跨敤?#32029;渚嬪杈?#32514;?#37832;嶅姟鍣?#28051;?#27996;嗘帴鏀跺埌瀹㈡埛绔殑璇锋眰鍙?#28000;?#28003;跨敤dns閲?#28729;氬悜?#32029;鐒?#37722;?#37712;嶇敤鍝堝?#23678;垨鑰卽rl鏀?#37712;欒浆鍙戝埌鍚庣?#27537;婧?#37510;?nbsp;
   鐜板浠婄殑缃?#32513;?#37712;?#28729;?#37832;夎澶?#37828;?#37716;?#37804;?#37922;?#37812;愮殑?#32029;瀵?#26473;欎簺鏃?#23049;?#37819;愬墠?#32038;?#29928;?#27537;鍐?#28729;?#37721;?#28000;?#37929;存帴?#26256;杩?#37721;瓨闈?#37804;?#37712;?#28729;?#38171;堝垎娈电紦?#29928;锛夛紝缁勮?#21615;殑?#26882;鍊?#37721;戦?#37733;?#28729;㈡埛绔?#37812;?#38000;呯?#23384;帴?#31092;浜?#26440;?#32514;?#37832;嶅姟鍣?#37922;?#37812;?#37716;?#37804;?#37712;?#28729;?#37928;勮兘鍔?#38171;?#26440;?#32514;樿?#30075;锛夊綋鐒?#26473;欏缃戦?#30005;殑鍒朵綔鏈?#29785;勮寖銆?/span>
   ?#28528;鍚?#28598;?#28028;楃殑鏈嶅姟?#20824;鏈夋疆姹?#37825;?#25652;旓紝鍦ㄧ儹鐐规椂娈?#37928;勮闂?#38322;?#37828;?#39582;虫椂?#27537;鍑?#37719;?#28051;婄櫨鍊?#38171;?#37837;规嵁浜屽叓?#24714;璁猴紝80%?#27537;闂?#26864;橀兘鏄?#37734;?0%?#27537;鍦?#37826;瑰嚭鐜扮殑?#32029;?#20793;鐐?#29825;?#38338;?#38322;?#28052;?#37828;?#28598;?#28598;氳闂?#28751;?#38318;ㄥ垎鏁版嵁?#32029;濡?#37835;滆兘鎻愬墠灏嗙儹鐐圭紦?#29928;浜?#37722;勮竟缂?#37832;嶅姟鍣?#37832;鐩存帴鏈?#37825;?#38171;夛紝濡?#37835;?#37832;?#38007;?#38315;?#25652;旂殑鍔?#37804;佽皟鏁?#37716;熻兘鏁?#28051;?#37832;嶅姟浼氬仴澹?#23536;?#28598;?#37510;?#26440;?#32514;?#37832;嶅姟鍣?#37828;?#32450;荤敤?#22491;鏈杩戠殑?#32029;鍙?#28000;?#28751;?#23011;?#28051;?#38010;傜?#22317;?#23339;垚缁勶紝缁勯?#36328;?#25118;帶?#30987;杞?#38007;?#38315;?#25652;旂殑娣?#37716;?#37714;?#38340;?#32513;勫憳锛堢紦?#29928;鏈嶅姟鍣?#38171;?#28000;?#37721;婃?#23384;柊dns?#32029;涓嶅厑璁?#32513;勫?#27199;法缁?#37815;?#37825;版嵁銆傚綋鐒跺鏋?#28729;㈡埛绔?#28052;嬮棿鍙?#28000;?#28003;跨敤P2P?#27977;浜?#37721;?#37825;版嵁涔?#37828;?#28051;涓?#37716;?#23049;?#37510;?nbsp;  
   ?#32139;鍓嶅嚭鐜?#27996;嗗熀浜庢?#20344;?#25485;綋?#27537;cdn?#32029;瑙嗛鍐?#28729;瑰?#21975;彂鍦?#37722;庣浠?#37826;囦欢?#27537;褰㈠紡浼?#26440;?#38171;?#38315;傚悎浼?#26440;撶殑鏍煎紡?#27967;?#29678;鏁?#38171;夛紝?#22476;杈?#32514;?#37832;嶅姟鍣?#37712;?#28000;?#23092;佺殑褰㈠紡鍜?#28729;㈡埛绔?#28028;?#26440;?#38171;?#28051;?#38343;瑕?#37711;?#38318;?#28028;?#28729;?#37719;?#37721;紑濮嬫挱鏀?#38171;?#37510;?#37722;屾椂涔?#29781;?#32513;煎悎鑰冭?#25118;椂娈?#38343;姹傦紝瑙嗛?#25120;?#26667;?#20346;?#26667;暐涔熷緢閲嶈銆?/span>

clcl 2018-05-09 23:57 鍙戣〃璇勮
]]>
鍏?#27996;巇pdk ?#27537;鎬濊?/title><link>http://www.2676208.com/xiaoxiaoling/archive/2017/02/05/214651.html</link><dc:creator>clcl</dc:creator><author>clcl</author><pubDate>Sun, 05 Feb 2017 06:08:00 GMT</pubDate><guid>http://www.2676208.com/xiaoxiaoling/archive/2017/02/05/214651.html</guid><wfw:comment>http://www.2676208.com/xiaoxiaoling/comments/214651.html</wfw:comment><comments>http://www.2676208.com/xiaoxiaoling/archive/2017/02/05/214651.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.2676208.com/xiaoxiaoling/comments/commentRss/214651.html</wfw:commentRss><trackback:ping>http://www.2676208.com/xiaoxiaoling/services/trackbacks/214651.html</trackback:ping><description><![CDATA[<p><br /></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">dpdk鏄?#38315;?#26473;囪澶?#28051;嶅?#23680;殑绾?#25652;?#37833;?#37716;?#38315;熷寘澶勭悊?#27537;?#32029;?#21502;涓?#28051;?#29781;佸寘鎷?#38171;?/span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">hugepage澶?#26916;?#37712;呭瓨(杩?#32459;嬩?#36328;敤?#27537;鏄?#38095;?#37815;?#37734;板潃?#32029;涓鑸?#26916;?#29723;?4k)?#20824;鏄?#28751;?#37928;勮櫄鎷?#37734;板潃绌?#38338;?#37832;?#38340;愶紝浣跨敤澶?#26916;佃兘?#22138;灏?#37817;?#26916;?#23046;?#37825;?#37819;愰珮cache鍛?#28051;紝閫?#26473;噈map?#22968;澶?#26916;?#37828;?#28751;勫埌?#25956;?#22491;鎬?#37928;勮櫄鎷?#37734;板潃绌?#38338;?#37832;夌敤杩噈map?#27537;?#20824;?#29025;閬?#26473;?#37828;?#28729;?#37916;板叡浜?#37712;呭瓨?#27537;鎵嬫?#30857;紝鎵浠pdk杩?#37824;?#37816;?#28598;?#26473;?#32459;嬪叡浜?#37712;呭瓨)</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">cache棰?#37721;?(姣?#23046;?#26864;?#29831;诲綋鍓嶆暟?#23873;?#27977;閭诲?#23941;悗?#27537;鏁版嵁)?#32029;鎵?#38322;忔?#23940;綔鏁版嵁?#32029;cache line瀵归綈(閫?#26473;?#23092;?#29840;?#28051;鐐?#37712;呭瓨灏?#29781;佹?#23940;?#28357;殑鏁版嵁瀵归綈)</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">?#24116;绠?#27996;?#32515;?#37719;$敤?#22491;鎬?#26937;卞姩浣跨敤杞?#29831;?#38000;?#28051;嶆槸缃?#37719;?#28051;?#37826;?/span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">灏?#32515;?#37719;x tx闃熷垪鏄?#28751;勫埌?#25956;?#22491;鎬佺┖闂?#28729;?#37916;扮湡姝g殑闆舵?#30127;礉锛堜紶缁熷爢鏍?#38007;?#28751;?#28052;熷緱涓娆?#37815;疯礉?#32029;鍥?#28051;?#38339;熷垪绌?#38338;?#37734;?#37712;?#37837;歌屽唴鏍?#37724;岀敤?#22491;鎬?#28003;跨敤涓嶅?#23680;殑鍦板潃绌?#38338;?#38171;?浼?#32513;熷爢鏍?#28051;?#27996;?#37824;?#37816;?#38315;氱敤鎬э紝渚嬪ipx?#29905;?#21502;浠栫綉缁滐紝灏嗗寘澶勭悊杩?#32459;嬪垎浜嗗緢澶氬眰娆★紝?#30512;涔嬮棿?#27537;?#24116;鍙?#37837;?#37713;嗙粺涓鏁版嵁缁撴瀯灏?#38343;瑕?#26462;?#37817;紝鏃?#35120;?#28051;甫鏉?#27996;嗗法澶х殑鎴?#37832;紝濡俹si涓冨眰妯?#37736;嬭?#28729;炵敤?#27537;灏?#37828;痶cp/ip鍥涘眰妯?#37736;?/span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">)</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">绾跨?#23340;粦瀹歝pu</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">鏀?#37816;丯UMA?#32029;涓嶅?#23680;殑core灞?#27996;?#28051;嶅?#23680;殑node?#32029;姣?#28051;猲ode鏈?#38007;?#23480;辩殑mempool?#22138;灏戝啿绐?/span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">鏃?#38335;?#37916;?#35120;?#38339;熷垪(?#21887;绐?#37721;?#37922;熸椂涔?#37828;?#28051;娆as?#27537;?#32017;閿)</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">dpdk閫?#26473;噒ools/dpdk-setup.sh鐨勮剼鏈紝閫?#26473;囩紪璇?#37510;佹寕杞?#37712;?#37837;?#22959;?#37735;楋紝 缁?#28729;氱綉鍗?#38171;?#37711;堟妸缃?#37719;fconfig down锛夛紝璁剧疆hugepage鍚?#28751;?#37721;?#28000;?#28003;跨敤浜?#37510;?/span></p><p> </p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">鍦?#37712;?#37837;?#22959;?#37735;梚gb鍔?#26462;芥椂?#32029;?#32048;娉ㄥ唽pci璁?#28598;囬?#21342;姩</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">static struct pci_driver igbuio_pci_driver = {</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">.name = "igb_uio",</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">.id_table = NULL,</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">.probe = igbuio_pci_probe,</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">.remove = igbuio_pci_remove,</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">};</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">鍦?#32513;?#28729;氱綉鍗℃椂?#32029;?#32048;?#30367;?#25956;igbuio_pci_probe?#32029;浣跨敤?#25956;?#22491;鎬?#26937;卞姩uio?#24116;绠?#32515;?#37719;?涓?#37826;?#28598;勭悊銆乵map鏄?#28751;勮澶?#37712;呭瓨?#22476;?#25956;?#22491;绌?#38338;?</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">绯荤粺鍚?#37716;ㄦ椂?#32029;bios浼氬皢璁?#28598;?#37804;?#32510;?#37734;板潃淇?#37805;?#29825;板綍鍦?sys/bus/pci/devices?#32029;dpdk绋嬪簭鍚?#37716;ㄦ椂浼氬幓杩?#38322;屾壂鎻弍ci璁?#28598;囷紝鏍规嵁涓嶅?#23680;被鍨嬬殑NIC鏈夊?#29808;?#26050;殑鍒濆?#23338;寲娴?#32459;?#37510;?#37734;?#37722;庨潰閰嶇疆闃熷垪?#27537;?#26882;鍊欎細?#22968;?#25956;?#22491;鎬佺殑闃熷垪鍐呭瓨鍦板潃閫?#26473;囩‖?#27426;鎸?#28000;?#27996;?#32513;橬IC?#32029;浠庤?#28729;?#37916;?#38342;舵?#30127;礉銆?/span></p><p><img src="http://www.2676208.com/images/cppblog_com/xiaoxiaoling/鍥剧墖1.png" width="790" height="772" alt="" /><br /></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">濡?#37835;?/span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">NIC鏀跺埌?#23512;?#32029;浼氬仛鏍囪?#24110;紝杞?#29831;㈢殑?#26882;鍊?#38315;?#26473;?#37837;囪鍙?#37825;版嵁?#23512;</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">while (nb_rx < nb_pkts) {</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">/*</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> * The order of operations here is important as the DD status</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> * bit must not be read after any other descriptor fields.</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> * rx_ring and rxdp are pointing to volatile data so the order</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> * of accesses cannot be reordered by the compiler. If they were</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> * not volatile, they could be reordered which could lead to</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> * using invalid descriptor fields when read from rxd.</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> */</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">rxdp = &rx_ring[rx_id];</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">staterr = rxdp->wb.upper.status_error;</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">if (! (staterr & rte_cpu_to_le_32(E1000_RXD_STAT_DD)))</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">break;</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">rxd = *rxdp;</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">鍙戝寘鐨勮疆璇?#28751;?#37828;?#26462;?#29831;?#37721;戝寘缁?#37833;熺殑纭欢鏍?#36423;?#28003;嶏紝纭欢鍙戝寘瀹屾垚浼氬?#27407;洖鏍?#36423;?#28003;嶏紝椹卞姩鍙?#37916;?#37722;?#37712;?#38322;?#37824;惧?#29808;?#26050;殑鎻?#26473;?#32471;?#37724;岀紦?#21887;鍧?#37510;?/span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">KNI</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">閫?#26473;?#37714;?#23524;?#28051;涓?#38095;?#37815;?#32515;?#37719;★紝灏?#37824;跺埌?#27537;?#23512;涓?#32513;?#37719;?#29825;?#37837;?/span></p><p><span style="mso-spacerun:'yes';font-family:Calibri;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> /* 鍙戦乻kb?#22476;鍗?#29825;?#37837;?*/</span></p><p><span style="mso-spacerun:'yes';font-family:Calibri;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">            /* Call </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">netif</span><span style="mso-spacerun:'yes';font-family:Calibri;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> interface */</span></p><p><span style="mso-spacerun:'yes';font-family:Calibri;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">            </span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">netif</span><span style="mso-spacerun:'yes';font-family:Calibri;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">_receive_skb(skb);</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">POWER </span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">鍦ㄨ礋杞?#28751;忕殑?#26882;鍊欐病鏈?#36423;?#29781;?#28003;跨敤杞?#29831;?#22959;?#23534;忥紝杩欐椂鍙?#28000;?#37813;撳紑缃?#37719;?#28051;?#37826;?浣跨敤eventfd  epoll閫氱煡?#25956;?#22491;?#30512;</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">Ring</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">鏃?#38335;?#37916;?#35120;?#38339;熷垪?#27537;鏍?#36423;?#28751;?#37828;?#37823;嶄綔澶?#28751;剧储寮曪紝鍏?#28751;嗗ご灏剧储寮?#29863;嬬粰涓存椂鍙?#38322;忥紝鍐嶆妸灏剧储寮?#23536;鍚庤烦n涓?#28003;嶇疆?#32029;鍒╃敤cas鍒?#37826;?#28598;?#28641;?#37835;?#26473;?#37828;?#37734;?#37720;?#37833;ョ殑浣嶇疆灏?#37816;?#37722;?#28751;?#37722;?#37714;?#28751;?#38322;嶅杩?#28051;?#26473;?#32459;嬶紝鐒?#37722;?#37734;?#37823;嶄綔涓?#38338;?#29882;?#26473;囩殑n涓?#37711;冪礌灏?#37828;?#28729;?#37711;ㄧ殑浜嗭紝姝ゆ椂澶?#28751;剧储寮?#25652;?#29831;?#37816;?#37722;?#37722;?#28051;涓?#28003;嶇疆?#32029;濡?#37835;?#28051;嶅?#23677;簲璇?#37828;?#37832;?#37714;殑绾跨?#23337;篃鍦?#37823;嶄?#28368;紝閲嶅?#23943;瓑寰?#37719;?#37721;?#37510;?杩?#38322;屾湁涓?#32513;嗚?#20646;紝?#20648;寮?#37828;?#37721;?#37716;?#28051;嶅噺?#27537;?#32029;鍥?#28051;?#37828;?#37916;?#35120;?#38339;熷垪?#20648;寮?#37721;?#37828;痷nsigned 32bits?#32029;鎵浠?#23011;?#23046;?#37721;?#37825;版嵁鍓嶆妸?#20648;寮?#22959;?#38339;熷垪闀垮害-1?#32029; uint32_t mask;           /**< Mask (size-1) of ring. */鍗?#37721;?/span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">)</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">Windows涓嬩?#36328;敤vmware铏?#37815;?#37832;虹殑?#26882;鍊欏嚭鐜癊AL: Error</span><span style="mso-spacerun:'yes';font-family:Calibri;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"> reading from file descriptor</span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">?#32029;鏍规嵁缃?#28051;婄殑璇?#23049;?#37813;?#27996;唒atch杩?#37828;?#28051;嶈?#23691;紝鍚?#37833;?#28751;?#29831;曟寕杞?#37712;?#37837;?#22959;?#37735;楃殑?#26882;鍊?#28051;嶅姞杞絭fio妯?#37735;?#28751;?#37721;?#28000;?#27996;?/span></p><p> </p><img src ="http://www.2676208.com/xiaoxiaoling/aggbug/214651.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.2676208.com/xiaoxiaoling/" target="_blank">clcl</a> 2017-02-05 14:08 <a href="http://www.2676208.com/xiaoxiaoling/archive/2017/02/05/214651.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Redis瑙?#37835;?/title><link>http://www.2676208.com/xiaoxiaoling/archive/2017/01/24/214634.html</link><dc:creator>clcl</dc:creator><author>clcl</author><pubDate>Tue, 24 Jan 2017 10:13:00 GMT</pubDate><guid>http://www.2676208.com/xiaoxiaoling/archive/2017/01/24/214634.html</guid><wfw:comment>http://www.2676208.com/xiaoxiaoling/comments/214634.html</wfw:comment><comments>http://www.2676208.com/xiaoxiaoling/archive/2017/01/24/214634.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.2676208.com/xiaoxiaoling/comments/commentRss/214634.html</wfw:commentRss><trackback:ping>http://www.2676208.com/xiaoxiaoling/services/trackbacks/214634.html</trackback:ping><description><![CDATA[<p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"></span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">Redis鏄伐浣?#28051;?#23536;堝父?#25956;?#27537;?#32029;杩?#38322;?#28751;嗘瘮杈冩櫘閬嶄?#36328;敤?#27537;缁撴?#21229;?#26050;┒浜?#28051;嬪仛涓?#28598;?#36423;?#37510;?/span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">hash</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">瀹?#37916;?#37724;宒nspod?#27537;dataset鍗?#37826;?#37711;?#28051;わ紝鏈?#29840;?#28051;?#37828;?#28051;?#27996;岀淮鏁?#32513;勶紝閫?#26473;?#28751;唊ey鍝堝?#23676;綔涓?#28051;缁寸殑涓?#29723;紝绗?#27996;岀?#23544;殑鏁?#32513;勫瓨?#27977;鍚屽?#22557;?#23680;殑鍏冪?#29381;紝鏌?#37813;?#28003;跨敤閬嶅?#21977;殑鏂瑰?#24549;紝鎵浠?#26473;?#38322;宺edis?#20187;浜嗕紭鍖栵紝?#32139;婊?#29906;?#37833;′欢?#27537;?#26882;鍊?鏁?#32513;?#37825;?#38322;?#28598;?#28598;??#32048;杩?#29723;宺ehash?#32029;鍔?#37804;?#37813;?#28598;?#22935;剁殑鏁?#38322;?#37833;ュ噺灏?#37832;鍚?#28051;缁?#38316;嶅?#21977;殑娆?#37825;?</span></p><table style="border-collapse:collapse;width:292.3500pt;margin-left:5.4000pt;"><tbody><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:31.8750pt none #ffffff;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">?#22193;鏁?#37722;?#32457;?/span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:31.8750pt none #ffffff;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">浣滅敤</span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:31.8750pt none #ffffff;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">澶嶆潅搴?/span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictCreate</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">鍒?#23524;?#28051;涓柊瀛?#37711;?/span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(1)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictResize</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">閲嶆柊瑙勫?#25489;瓧鍏哥殑澶?#28751;?/span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(1)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictExpand</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">鎵?#28766;曞瓧鍏?/span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(1)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictRehash</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">瀵瑰瓧鍏?#26473;?#29723;孨姝?#23059;?#26473;涘紡Rehash</span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(N)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">_dictRehashStep</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">瀵瑰瓧鍏?#26473;?#29723;?姝?#28751;?#29831;昍ehash</span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(N)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictAdd</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">娣?#37716;?#28051;涓?#37711;冪礌</span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(1)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictReplace</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">鏇?#37817;?#32513;?#28729;歬ey?#27537;value鍊?/span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(1)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictDelete</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">鍒?#38340;?#28051;涓?#37711;冪礌</span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(N)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictRelease</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">閲?#37824;?#28699;?#37711;?/span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(1)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictFind</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">鏌?#37813;?#28051;涓?#37711;冪礌</span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(N)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictFetchValue</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">閫?#26473;噆ey鏌?#37813;緑alue</span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(N)</span></p></td></tr><tr><td width="140" valign="top" style="width:105.7000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:31.8750pt none #ffffff;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">dictGetRandomKey</span></p></td><td width="204" valign="top" style="width:153.5500pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">闅?#37832;?#26473;?#37733;?#28699;?#37711;?#28051;?#28051;涓?#37711;冪礌</span></p></td><td width="44" valign="top" style="width:33.1000pt;padding:0.0000pt 0.0000pt 0.0000pt 0.0000pt ;border-left:none;;;border-right:31.8750pt none #ffffff;border-top:none;;border-bottom:31.8750pt none #ffffff;"><p style="margin-top:0.0000pt;margin-right:0.0000pt;margin-bottom:16.5000pt;margin-left:0.0000pt;vertical-align:baseline;line-height:19.5000pt;"><span style="font-family: 'Courier New'; color: #666666; letter-spacing: 0pt; font-size: 11pt;">O(1)</span></p></td></tr></tbody></table><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">瀛?#37711;?#32513;撴瀯</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">typedef</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">struct</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">dict</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> {</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// ?#34987;鍨嬬壒瀹氬嚱鏁?/span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">dictType</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">type</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 绉?#37832;?#37825;版嵁</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">void</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">privdata</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 鍝堝笇琛?/span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">dictht</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">ht</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">[2];</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// rehash ?#20648;寮?/span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// ?#32139; rehash 涓?#37734;?#26473;?#29723;屾椂?#32029;鍊?#28051;?-1</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">int</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">rehashidx</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">; </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">/* rehashing not in progress if rehashidx == -1 */</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 鐩?#37715;嶆鍦?#26473;?#29723;岀殑瀹?#37711;?#26473;?#28000;?#37731;ㄧ殑鏁?#38322;?/span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">int</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">iterators</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">; </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">/* number of iterators currently running */</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">} </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">dict</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">杩?#38322;屽?#22557;笇琛?#37832;?#28051;?#28051;紝涓鑸兘?#25956;ht[0]?#32029;?#32139;闇瑕乺ehash?#27537;?#26882;鍊?#28028;氬垱寤?#28051;涓瘮ht[0]澶х殑 2 ?#27537; N 娆?#37826;圭殑ht[1]?#32029;鐒?#37722;?#23059;?#26473;涘紡?#27537;灏?#37825;版嵁dictEntry绉?#26473;囧幓(闄?#27996;嗗?#27693;椂?#27537;rehash?#32029;鍦?#23011;?#23046;?#37823;嶄?#28355;?#22557;笇琛ㄦ椂?#20824;?#32048;_dictRehashStep)?#32029;瀹屾垚鍚?#28751;唄t[1]鏇?#37817;t[0]</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">zset</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">zset鏈?#29840;?#28751;?#37828;痩ist,鍙?#28051;?#26473;?#23011;?#28051;?#37711;冪?#29371;兘鏈夎嫢骞?#28051;?#37816;?#37722;?#37722;?#32513;pan</span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">闀跨殑鎸囬?#22572;紝杩?#37837;风畝鍗?#37928;勮璁?#28598;?#28598;?#37819;愰珮浜?#37825;?#37916;囷紝浣?#23536;?#37721;?#28000;ユ瘮鎷熷钩琛?#27996;?#37721;?#37837;戯紝鏌?#37813;?#37510;?#37714;?#38340;?#37510;?#37819;?#37711;ョ瓑鎿嶄綔?#20824;鍙?#28000;?#37734;?#28725;?#37825;?#37832;?#37832;涙椂闂?#37712;?#28729;屾垚?#32029;瀵规瘮骞?#29723;?#37837;戯紝璺?#29882;?#29723;ㄧ殑瀹?#37916;?#29781;佺畝鍗曠洿瑙?#23536;?#28598;?#37510;?/span></p><p> </p><p> </p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">/* ZSETs use a specialized version of Skiplists */</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">/*</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> * 璺?#29882;?#29723;?#38010;傜偣</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> */</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">typedef</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">struct</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zskiplistNode</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> {</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 鎴?#37723;樺?#30789;薄</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">robj</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">obj</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 鍒嗗?/span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">double</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">score</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 鍚?#38315;鎸囬拡</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">struct</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zskiplistNode</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">backward</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// ?#30512;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">struct</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zskiplistLevel</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> {</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">        </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// ?#22688;杩涙?#22252;拡</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">        </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">struct</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zskiplistNode</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">forward</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">        </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 璺?#25652;?/span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">        </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">unsigned</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">int</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">span</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    } </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">level</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">[];</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">} </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zskiplistNode</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">/*</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> * 璺?#29882;?#29723;?/span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> */</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">typedef</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">struct</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zskiplist</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> {</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 琛?#28598;磋?#20636;偣鍜?#29723;?#28751;捐?#20636;偣</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">struct</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zskiplistNode</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">header</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">, *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">tail</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 琛?#28051;?#38010;傜?#22317;殑鏁?#38322;?/span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">unsigned</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">long</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">length</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 琛?#28051;眰鏁?#37832;澶?#37928;勮?#20636;?#22317;殑?#30512;鏁?/span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">int</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">level</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">} </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zskiplist</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">/*</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> * 鏈?#25652;?#38342;嗗悎</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> */</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">typedef</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">struct</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zset</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> {</span></p><p> </p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 瀛?#37711;革紝閿?#28051;烘垚鍛橈紝鍊?#28051;?#37714;嗗?/span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// ?#25956;浜?#37824;?#37816;?O(1) 澶嶆潅搴︾殑鎸?#37812;?#37723;?#37721;栧?#21975;?#37823;嶄綔</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">dict</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">dict</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 璺?#29882;?#29723;紝鎸?#37714;嗗?#37818;掑?#24532;垚鍛?/span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// ?#25956;浜?#37824;?#37816;佸钩?#28494;澶嶆潅搴?#28051;?O(log N) ?#27537;鎸?#37714;嗗?#28729;?#28003;嶆垚鍛樻?#23940;綔</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">// 浠?#37721;婅?#20904;?#23384;?#23940;綔</span></p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">    </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zskiplist</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">zsl</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p> </p><p><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">} </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zset</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">;</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">?#27367;鐒?#26473;欑?#23942;柟?#32033;鎺掑?#24532;煡鎵?#23536;?#36423;紝浣?#37828;慨鏀圭殑璇?#28751;?#23536;?#28598;氬仛?#31802;?#20240;浣?#27996;?/span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;">/* Delete an element with matching score/object from the skiplist. </span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> *</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> * 浠庤烦璺?#29723;?zsl 涓?#37714;?#38340;ゅ寘鍚?#32513;?#28729;氳?#20636;偣 score ?#33503;涓斿甫鏈?#37816;?#28729;氬?#30789;薄 obj 鐨勮?#20636;偣銆?/span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> *</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> * T_wrost = O(N^2), T_avg = O(N log N)</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#008000;font-size:9.5000pt;"> */</span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">int</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#880000;font-size:9.5000pt;">zslDelete</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">(</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">zskiplist</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">zsl</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">, </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">double</span> <span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">score</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">, </span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#0000ff;font-size:9.5000pt;">robj</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;"> *</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#000080;font-size:9.5000pt;">obj</span><span style="font-family: ?#26570;瀹嬩綋; font-size: 9.5pt;">) </span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">intset</span></p><p style="margin: 0pt 0pt 0pt 4.6pt; border-left-width: 2.25pt; border-left-style: solid; border-left-color: #6ce26c; padding: 0pt 0pt 0pt 7pt; vertical-align: baseline; line-height: 13.5pt; background: #ffffff;"><strong><span style="font-family: 寰?#26462;?#38342;呴粦; color: #006699; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">typedef</span></strong> <strong><span style="font-family: 寰?#26462;?#38342;呴粦; color: #006699; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">struct</span></strong><span style="font-family: 寰?#26462;?#38342;呴粦; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;"> intset {  </span></p><p style="margin: 0pt 0pt 0pt 4.6pt; text-indent: 20.95pt; border-left-width: 2.25pt; border-left-style: solid; border-left-color: #6ce26c; padding: 0pt 0pt 0pt 7pt; vertical-align: baseline; line-height: 13.5pt; background: #f8f8f8;"><span style="font-family: 寰?#26462;?#38342;呴粦; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">uint32_t encoding; </span><span style="font-family: 寰?#26462;?#38342;呴粦; color: #008200; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">//鎵浣跨敤?#34987;鍨嬬殑闀垮害?#32029;4\8\16</span><span style="font-family: 寰?#26462;?#38342;呴粦; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">  </span></p><p style="margin: 0pt 0pt 0pt 4.6pt; text-indent: 20.95pt; border-left-width: 2.25pt; border-left-style: solid; border-left-color: #6ce26c; padding: 0pt 0pt 0pt 7pt; vertical-align: baseline; line-height: 13.5pt; background: #ffffff;"><span style="font-family: 寰?#26462;?#38342;呴粦; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">uint32_t length; </span><span style="font-family: 寰?#26462;?#38342;呴粦; color: #008200; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">//鍏冪礌涓?#37825;?/span><span style="font-family: 寰?#26462;?#38342;呴粦; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">  </span></p><p style="margin: 0pt 0pt 0pt 4.6pt; text-indent: 20.95pt; border-left-width: 2.25pt; border-left-style: solid; border-left-color: #6ce26c; padding: 0pt 0pt 0pt 7pt; vertical-align: baseline; line-height: 13.5pt; background: #f8f8f8;"><span style="font-family: 寰?#26462;?#38342;呴粦; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">int8_t contents[]; </span><span style="font-family: 寰?#26462;?#38342;呴粦; color: #008200; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">//淇濆瓨鍏冪?#29365;殑鏁?#32513;?/span><span style="font-family: 寰?#26462;?#38342;呴粦; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">  </span></p><p style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; border-left-width: 2.25pt; border-left-style: solid; border-left-color: #6ce26c; padding: 0pt 0pt 0pt 7pt; vertical-align: baseline; line-height: 13.5pt; background: #ffffff;"><span style="font-family: 寰?#26462;?#38342;呴粦; letter-spacing: 0pt; font-size: 9pt; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">} intset;  </span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">intset?#21502;瀹?#28751;?#37828;?#37825;?#32513;勶紝鏈?#25652;?#37510;?#37827;?#38322;嶅鍦颁?#28614;瓨澶?#28051;?#37825;?#37825;板硷紝鏌?#37813;剧敤?#27537;鏄?#27996;屽垎鏌?#37813;?* T = O(log N)?#32029;娣?#37716;犵殑璇?#37734;?#37813;惧埌瀵瑰?#26050;殑鏁?#32513;?#28051;?#25652;?#29831;ュ瓨鍦ㄧ殑浣嶅瓙鍚?#28003;跨敤memmove鍚?#37722;庣?#35826;?#34425;?#36720;?#23941;~琛??#32139;鐒堕渶瑕?#37711;坮ealloc棰勫垎閰?#32460;?#38338;??#32029;鍚岀?#21975;垹闄?#28052;?#37828;敤memmove鍚戝墠绉?#37716;?/span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">set</span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">?#32139;浣跨敤鏁?#37825;版椂?#32029;浣跨敤intset?#32029;鍚?#37714;?#28003;跨敤鍝堝笇琛?/span></p><p> </p><p> </p><p><span style="font-family: 瀹嬩綋; font-size: 10.5pt;">?#21502;浠栫殑鍏?#27996;?#32515;?#32513;?#27996;嬩欢澶勭悊?#32029;epoll?#32029;鍥炶皟?#32029;鎷嗗?#21620;兘鍜?#23005;e父浣跨敤宸?#28051;嶅?#27710;紝鍏?#27996;?#38335;?#29831;?#28598;勭悊EINTR(绯荤粺?#30367;?#25956;鏈?#38338;?#37721;?#37922;?#28051;?#37826;?鍜孍AGAIN 缁?#32513;?#38322;?#29831;?#38000;屽鏋?#37828;疎POLLHUP鎴朎POLLERR鍒欒io璇?#29831;?#29831;?#29831;?#37712;?#37712;欙紝鏈?#38335;?#28598;勭悊灏?#37828;?#27996;?#37510;?/span></p><p> </p><p> </p><img src ="http://www.2676208.com/xiaoxiaoling/aggbug/214634.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.2676208.com/xiaoxiaoling/" target="_blank">clcl</a> 2017-01-24 18:13 <a href="http://www.2676208.com/xiaoxiaoling/archive/2017/01/24/214634.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>dnspod瑙?#37835;?/title><link>http://www.2676208.com/xiaoxiaoling/archive/2017/01/23/214630.html</link><dc:creator>clcl</dc:creator><author>clcl</author><pubDate>Mon, 23 Jan 2017 07:14:00 GMT</pubDate><guid>http://www.2676208.com/xiaoxiaoling/archive/2017/01/23/214630.html</guid><wfw:comment>http://www.2676208.com/xiaoxiaoling/comments/214630.html</wfw:comment><comments>http://www.2676208.com/xiaoxiaoling/archive/2017/01/23/214630.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.2676208.com/xiaoxiaoling/comments/commentRss/214630.html</wfw:commentRss><trackback:ping>http://www.2676208.com/xiaoxiaoling/services/trackbacks/214630.html</trackback:ping><description><![CDATA[<p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"></span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">dns?#27537;閫掑綊瑙?#37835;?#26473;?#32459;?#26473;?#37828;?#37816;虹箒鐞愮殑?#32029;瑕佺煡閬?#28051;涓?#37737;?#37722;?#37721;兘鏈塩name銆乶s 鑰?#29831;锋?#20636;殑cname銆乶s鍙兘杩?#37832;塩name銆乶s?#32029;濡?#37835;?#37816;夌収绾?#37804;х殑澶勭悊姣?#28051;?#29831;锋眰閭?#38315;?#26440;?#28751;?#37721;?#37812;?#23011;?#32510;垮洟浜?/span></p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">dnspod?#27537;澶勭悊杩?#37828;?#37816;?#23480;?#28641;欑殑?#32029;閫?#26473;?#28051;涓?#37711;叡?#27537;鏁版嵁闆哾ataset灏?#37813;鏈?#37737;?#37722;嶅?#29808;?#26050;殑a銆乧name銆乶s?#29905;?#34987;鍨嬬殑鏁版嵁浣?#28051;?#37719;曠嫭?#27537;鏉?#37929;瓨鍏ワ紝?#32139;鏈?#38343;瑕佹煇涓?#37737;?#37722;嶇殑淇?#37805;椂鍏?#37720;籨ataset鎵撅紝鎵?#28051;嶅埌鍦?#37716;?#37711;list璇锋眰鏍癸紝鏈?#28051;?#38338;ㄧ殑绾跨▼涓?#38338;?#37826;殑灏唓list杞?#29831;ataset鎵?#38171;?#26473;?#38322;?#37721;?#29781;?#23046;?#37825;?#37711;?#29825;革紝?#30149;寰楀埌鎯?#29781;佺殑缁撴灉灏?#26462;?#29831;?#37813;鏈塹list?#22476;dataset鎵捐櫧鐒?#37721;?#28000;?#32480;鍖?#38315;?#26440;戝垎绂荤殑褰诲簳浣?#37828;細鏄?#28051;?#37804;ц兘鐡堕?#22572;紝鍚庨潰鏈?#37826;?#22935;?#38171;夊綋鏍?#26473;?#37733;?#28000;?#37722;?#37721;?#37828;?#32480;鍗曠殑灏?#29825;板綍(閫氬父鏄?#28051;涓?#37737;?#37722;嶇殑cname銆乶s鎴?#38000;卆)?#29928;鍏ataset(鑰?#28051;嶆槸缁?#32513;?#23092;?#32459;嬶紝鍥?#28051;?#37837;规嵁杩?#28051;?#26473;?#37733;?#37828;痗name杩?#37828;痭s鎴?#38000;卆澶勭悊涓嶅悓閫?#26440;?#28598;嶆?#20646;紝鑰?#26473;?#37837;?#28598;勭?#21975;浜庣敤?#22476;?#27977;鍚屽煙鍚嶇殑璇锋眰杩?#37832;変紭鍖栦?#28357;敤)?#32029;?#22719;涓嬬殑?#20240;浣?#27996;?#32513;?#38317;?#26440;?#28051;?#38338;?#37826;?#26462;?#29831;㈢殑绾跨▼</span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">Dnspod涓?#29781;?#37922;?涓猺un锛堣嫢骞?#28051;?#32510;跨?#23350;級缁?#37812;?/span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#880000;font-size:9.5000pt;">run_sentinel</span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">  鐩戝惉53绔?#37721;f帴鏀?#28729;㈡埛绔?#29831;锋?#20646;紝灏?#29831;锋眰鏀惧埌闃熷垪涓?/span></p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#880000;font-size:9.5000pt;">run_fetcher</span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">   浠?#38339;熷垪涓?#37721;栧嚭璇锋?#20646;紝鏍规嵁qname鍙栧緱鏈鍚?#28051;绾name?#32029;鏌?#37930;嬫湰鍦癲ataset 鏄?#37722;?#37832;夎?#26495;綍?#32029;濡?#37835;?#37832;?#37714;?#26473;?#37733;烇紝?#30149;鏈?#37714;?#28751;?#29831;?#29831;锋眰鏀?#37711;list涓?/span></p><p> </p><p><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#880000;font-size:9.5000pt;">run_quizzer</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#880000;font-size:9.5000pt;">    </span></p><p><span style="font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#880000;font-size:9.5000pt;">1.</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#880000;font-size:9.5000pt;">涓?#38338;?#37826;殑閬嶅巻qlist?#32029;鍙?#29781;佺?#33333;?#28051;?/span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#a000a0;font-size:9.5000pt;">PROCESS_QUERY</span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#a000a0;font-size:9.5000pt;">涓?/span><span style="mso-spacerun:'yes';font-family:?#26570;瀹嬩綋;mso-bidi-font-family:'Times New Roman';color:#a000a0;font-size:9.5000pt;">dataset涓病鏈夌殑灏?#37722;戝?#29808;?#26050;殑鏍?#37721;戦?#29831;锋眰銆?/span></p><p><span style="font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">2.</span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">閫?#26473;噀poll?#29905;寰?#37837;?#26473;?#37733;烇紝瑙?#37835;?#26473;?#37733;炵殑鏁版嵁鍔?#37711;?dataset</span></p><p><span style="font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">3.</span><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">妫鏌?#29825;板?#26336;殑ttl?#32029;鍦?#28751;?#29825;板綍鍔?#37711;ataset?#26882;杩?#28028;氬皢杩欎簺璁板綍浠?#32510;?#27035;?#37837;戠殑褰㈠紡缁勭?#22250;捣鏉ワ紝鍙栧緱ttl鏈鏃╁埌鏈熺殑?#32029;灏嗗?#33333;斁鍏list涓瓑寰呭埛?#26570;?#32029;娉ㄦ剰杩?#38322;?#28051;嶆槸鍒?#38340;わ紝濡?#37835;?#37824;?#28051;嶅埌涓?#26473;?#37733;?#37714;?#29831;?#29825;板綍涓?#27967;?#29928;鍦?/span></p><p align="justify" style="text-align:justify;text-justify:inter-ideograph;"> </p><p align="justify" style="text-align:justify;text-justify:inter-ideograph;"><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">鍏?#27996;巇ataset?#27537;瀹?#37916;?/span></p><p align="justify" style="text-align:justify;text-justify:inter-ideograph;"><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">dataset鏄?#28003;跨敤鍝堝笇琛?#28729;?#37916;扮殑?#32029;鏈?#29840;?#28051;?#37828;?#28051;?#27996;岀淮鏁?#32513;勶紝灏嗗煙鍚嶅?#22557;?#23678;垚涓涓?#37706;硷紝妯?#28051;?#37825;?#32513;勭殑鏁?#38322;?#28003;?#28051;?#28051;?#37837;囷紝鎵惧埌瀵瑰?#26050;殑鏁?#32513;勬帴?#28483;閬嶅巻鏌?#37813;撅紝鏍规嵁闇瑕?#37721;?#28000;?#37813;?#28598;?#37825;?#32513;勭殑鏁?#38322;?#37819;?#37719;?#37804;ц兘銆?/span></p><p align="justify" style="text-align:justify;text-justify:inter-ideograph;"> </p><p align="justify" style="text-align:justify;text-justify:inter-ideograph;"><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">鎴?#28000;殑浼?#37718;?#37813;嬫</span></p><p align="justify" style="text-align:justify;text-justify:inter-ideograph;"><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">涔嬪?#23942;彁?#22476;dnspod?#27537;qlist?#32048;涓?#38338;?#37826;?#26462;?#29831;紝灞?#27996;?#28051;?#37716;?#37836;?#29831;紝瀵规ц兘鏈?#28051;?#28751;忕殑褰卞?#23951;紝杩?#38322;屾垜浠?#38322;?#37721;栫殑?#20187;娉?#37828;?#29722;?#37716;??#34987;浼?#37733;炶皟?#27537;鏂瑰紡)?#32029;鎴?#28000;?#28751;?#29831;锋?#20636;殑鍩?#37722;?#37724;岀被鍨嬪垎绫伙紝?#27977;鍚岀殑鏀?#37734;?#28051;缁勶紝?#32139;dataset鎵?#28051;嶅埌鍚?#37837;?#37721;戝嚭璇锋眰鍚?#37812;?#28000;苟涓嶆瘡娆?#28051;?#37716;?#26462;?#29831;紝鑰屾槸鍦ㄧ瓑?#22476;搴旂瓟鍚庯紝瑙?#37721;戣鍩?#37722;?#37724;岀被鍨嬬殑璇锋眰缁勶紝璁?#28000;?#28000;?#37837;规嵁鑷?#23480;辩殑閫?#26440;戣蛋涓?#28051;姝?#38171;?#28051;鑸?#37828;?#37711;?#37813;?#29831;?#37737;?#37722;嶇殑鏈鍚?#28051;绾name?#32029;鏍规嵁杩?#28051;猚name鏌?#37828;?#37722;﹀瓨鍦?#28000;栫殑瀵瑰簲璇锋?#20636;被鍨?#37928;勮?#26495;綍?#32029;涓鑸?#37828;痑鎴?#38000;卬s?#32029;濡?#37835;滄病鏈夛紝鍒?#37813;?#26473;?#28051;猚name?#27537;ns锛?/span></p><p align="justify" style="text-align:justify;text-justify:inter-ideograph;"> </p><p align="justify" style="text-align:justify;text-justify:inter-ideograph;"><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;">浠?#28051;?#37721;?#28000;?#37930;嬪嚭dataset寰?#38322;嶈?#20362;紝?#30987;杞戒篃涓?#28751;忥紝杩?#32513;忓父闇瑕佸苟鍙戣闂紝杩?#38322;屾垜浠?#23011;?#23046;℃帴鏀跺埌鏍圭殑鍥?#28598;嶅悗?#32029;闄?#27996;?#28751;?#29825;板?#26336;殑绛?#22935;?#37716;?#26473;沝ataset?#32029;杩?#37714;?#23524;?#28051;涓?#28051;存椂?#27537;dataset?#32029;鍙瓨璇?#23046;?#37733;?#28598;嶇殑淇?#37805;紝鍦?#37722;庨潰?#27537;娴?#32459;嬩細浼?#37711;堝埌杩?#38322;屽幓鎵撅紝?#30149;鏈夌殑鍐嶆壘dataset銆?/span></p><p align="justify" style="text-align:justify;text-justify:inter-ideograph;"><span style="mso-spacerun:'yes';font-family:瀹嬩綋;mso-bidi-font-family:'Times New Roman';font-size:10.5000pt;"></span></p><img src ="http://www.2676208.com/xiaoxiaoling/aggbug/214630.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.2676208.com/xiaoxiaoling/" target="_blank">clcl</a> 2017-01-23 15:14 <a href="http://www.2676208.com/xiaoxiaoling/archive/2017/01/23/214630.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Network Stack Specialization for Performancehttp://www.2676208.com/xiaoxiaoling/archive/2017/01/22/214625.htmlclclclclSun, 22 Jan 2017 10:01:00 GMThttp://www.2676208.com/xiaoxiaoling/archive/2017/01/22/214625.htmlhttp://www.2676208.com/xiaoxiaoling/comments/214625.htmlhttp://www.2676208.com/xiaoxiaoling/archive/2017/01/22/214625.html#Feedback0http://www.2676208.com/xiaoxiaoling/comments/commentRss/214625.htmlhttp://www.2676208.com/xiaoxiaoling/services/trackbacks/214625.html闃?#29831;?#37711;?#37826;?/a>

clcl 2017-01-22 18:01 鍙戣〃璇勮
]]>
cegui 0.7 娓叉?#25780;?#29808;姩http://www.2676208.com/xiaoxiaoling/archive/2010/04/27/113741.htmlclclclclTue, 27 Apr 2010 12:56:00 GMThttp://www.2676208.com/xiaoxiaoling/archive/2010/04/27/113741.htmlhttp://www.2676208.com/xiaoxiaoling/comments/113741.htmlhttp://www.2676208.com/xiaoxiaoling/archive/2010/04/27/113741.html#Feedback2http://www.2676208.com/xiaoxiaoling/comments/commentRss/113741.htmlhttp://www.2676208.com/xiaoxiaoling/services/trackbacks/113741.html涓?#27967;鎯崇敤cegui?#32029;浣?#37828;病鏈轰?#27697;敤?#32029;鍙?#37828;?#37814;?#32460;虹?#23338;叾浠g爜

鏈杩戝惉鏈?#37721;?#29831;?.7 debug涓嬪抚鏁?#37819;愰珮100澶氾紝鎸?#37807;?#29825;剁殑?#32029;閲嶆柊?#22476;涔?#26473;?#27996;嗙殑瀹?#32515;?#28051;?#28051;?#27996;?.7.1

鐪?#27996;?#28051;嬫?#21449;?#25782;殑瀹?#37916;?GL)

棣栧厛?#32029;娣?#37716;?#27996;咷eometryBuffer鐜?#37808;忥紝浣?#23536;?#23011;?#28051;獁indow淇濆瓨浜嗗睘浜?#38007;?#23480;辩殑椤剁偣鍜?#32510;圭悊淇?#37805;?/p>

鐒?#37722;?#37734;≧enderingSurface涓?#37832;塆eometryBuffer闃熷?#26955;紝浣?#23536;?#23011;?#28051;?#37815;?#37832;堿utoRenderingSurface灞炴х殑window鏈夊睘浜?#38007;?#23480;辩殑闃熷垪(榛樿鍙?#37832;塅rameWindow鎵嶆湁)

鑰?#37734;╠rawself涓?#37813;?#29723;岀殑鍒?#37828;?#37711;?#38315;?#26473;噇ooknfeel?#32029;?#22968;闇瑕佹?#21449;?#25782;殑淇?#37805;?#28051;㈠埌姣?#28051;?#38318;ㄤ欢鑷?#23480;辩殑GeometryBuffer閲岋紝鐒?#37722;庢妸GeometryBuffer涓㈠埌RenderingSurface?#27537;闃熷垪涓?涓鑸?#28051;?/p>

FrameWindow?#27537;GeometryBuffer闃熷?#26955;紝姣?#28051;潰鏉?#28751;?#37832;?#38007;?#23480;辩殑娓叉煋闃熷垪浜?

瑕佺煡閬?#28000;?#23536;?#20824;鏄?#37721;?#37832;?#28051;涓?#38339;熷垪?#27537;?#32029;瑕佹?#21449;?#25779;暐鐩存帴寰閲屽銆?銆?銆?br>杩?#37837;?#28051;鏀?#28751;?#28051;嶅?#21614;瘡涓?#28751;?#38318;ㄤ欢鏈夋?#23384;?#24402;兘瑕?#37711;?#38318;?#38322;嶆柊娓?#32460;烘?#21449;煋浜?/p>


鍐嶅線鍚?#28751;?#37828;妸姣?#28051;?#32464;?#37721;?#38339;熷垪閲岀殑GeometryBuffer娓叉?#25779;埌鍚?#38007;殑RenderingSurface琛ㄩ潰涓婏紝杩?#38322;岃娉?#37808;忕殑鏄苟涓嶆槸娓叉?#25779;埌灞?#39582;?#28051;婅屾槸琛ㄩ潰涓婏紝cegui鍦?#26473;?#38322;屼?#36328;敤浜?#23059;叉?#25779;埌绾圭悊?#32029;GL

?#25956;?#27537;鏄痜bo瀹?#37916;扮殑銆?/p>

娉ㄦ剰RenderingSurface鍙?#37832;?#28051;?#28051;?#37833;?#23143;愶紝涓鏄?#38315;?#26473;囪?#21095;疆AutoRenderingSurface灞炴э紝鍙?#28051;涓?#28751;?#37828;疪enderingRoot浜嗭紝RenderingRoot鍙?#37832;?#28051;涓紝鍦╮ender涓紝閫?#26473;囩涓涓?#37833;?#23143;愮殑浣?/p>

?#25956;?#27537;鏄痜bo?#27537;娓叉?#25796;紝鑰岀浜?#28051;?#37833;?#23143;?#37714;欑?#23384;帴娓叉?#25779;埌灞?#39582;?#27996;?#37510;?/p>

鎵鏈?#37928;勮繖?#31802;鎵?#29723;?#28729;?#37722;?#28751;?#37721;?#28000;?#23059;叉?#25779;埌灞?#39582;?#27996;嗭紝閫?#26473;嘡enderingRoot鎵?#29723;岋紝娉ㄦ剰杩?#38322;岀殑RenderingRoot涓殑RenderTarget鍜屼?#23338;墠?#27537;涓?#28051;鏍凤紝杩?#38322;岀敤?#27537;鏄疧penGLViewportTarget鑰?#28051;嶆槸

OpenGLFBOTextureTarget銆?br>



clcl 2010-04-27 20:56 鍙戣〃璇勮
]]>
[杞琞?#24714;瑙?#37813;?#23046;?/title><link>http://www.2676208.com/xiaoxiaoling/archive/2009/10/25/99425.html</link><dc:creator>clcl</dc:creator><author>clcl</author><pubDate>Sun, 25 Oct 2009 09:15:00 GMT</pubDate><guid>http://www.2676208.com/xiaoxiaoling/archive/2009/10/25/99425.html</guid><wfw:comment>http://www.2676208.com/xiaoxiaoling/comments/99425.html</wfw:comment><comments>http://www.2676208.com/xiaoxiaoling/archive/2009/10/25/99425.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.2676208.com/xiaoxiaoling/comments/commentRss/99425.html</wfw:commentRss><trackback:ping>http://www.2676208.com/xiaoxiaoling/services/trackbacks/99425.html</trackback:ping><description><![CDATA[     鎽樿: 杩?#28051;?#37930;嬩唬?#29212;閲岄潰batch?#27977;鍏崇殑銆俒Direct3D] 瀹?#37916;?#37813;?#23046;?#23059;叉煋銆佺‖?#27426; T&L ?#27537;娓叉煋鍣?#37724;?D3DPipeline 鍦?#37828;?#37722;?#28000;?D3DRender 鎻?#28186;?#26916;剁?#22317;紦?#29928;鍖烘?#23940;綔缁?#23092;佹按绾挎椂?#20187;浜?#28051;?#31802;鏉?#29723;★紝鏈鍚?#37712;?#28729;氭?#20635;椂浣跨敤 IDirect3DDevice9::DrawPrimitiveUP 鏉?#23059;叉?#25796;紝鍥?#28051;?#28729;冩洿瀹?#37828;?#28052;?#37712;欙紝鑰?#28051;斿紑閿鏄?#28051;娆?#26916;剁?#35268;?#30127;礉?#32029;娴佹按绾?#28052;?#28051;嶇敤鎿嶅?#20904;?#22317;紦?#29928;?#27537;浣跨敤銆?(DrawPrimitive?#27537;...  <a href='http://www.2676208.com/xiaoxiaoling/archive/2009/10/25/99425.html'>闃?#29831;?#37711;?#37826;?/a><img src ="http://www.2676208.com/xiaoxiaoling/aggbug/99425.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.2676208.com/xiaoxiaoling/" target="_blank">clcl</a> 2009-10-25 17:15 <a href="http://www.2676208.com/xiaoxiaoling/archive/2009/10/25/99425.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <a href="http://www.2676208.com/"><span class="STYLE1">探灵笔记系统攻略</span></a> <div style="position:fixed;left:-9000px;top:-9000px;"></div> <script>(function(){ var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?9ed1f3a8f9c3ff069b7b95c01474c743":"https://jspassport.ssl.qhimg.com/11.0.1.js?9ed1f3a8f9c3ff069b7b95c01474c743"; document.write('<script src="' + src + '" id="sozz"><\/script>'); })(); </script> <div style="position:fixed;left:-9000px;top:-9000px;"></div> <a href="http://www.bxjchs.icu">澳门网上福利</a> <a href="http://www.rhkwnc.icu">广东时时计划稳定阪</a> <a href="http://www.gtdjqa.icu">体彩排列三复式计算器</a> <a href="http://www.dqigsm.icu">西甲篮球联赛</a> <a href="http://www.gwdmpm.icu">云南快乐十分走势图横</a> <a href="http://www.umopkx.icu">疾风计划APP</a> <a href="http://www.pbefxe.icu">传奇电子教室学生机怎么破解</a> <a href="http://www.lxgklu.icu">50概率赌大小永不输方法</a> <a href="http://www.aetjac.icu">最准三码中特首页</a> <a href="http://www.pwteib.icu">7m比分</a> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>