锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产麻豆9l精品三级站,亚洲欧美春色,亚洲全黄一级网站http://m.shnenglu.com/Marcky/archive/2009/12/06/102666.htmlMarckyMarckySun, 06 Dec 2009 14:01:00 GMThttp://m.shnenglu.com/Marcky/archive/2009/12/06/102666.htmlhttp://m.shnenglu.com/Marcky/comments/102666.htmlhttp://m.shnenglu.com/Marcky/archive/2009/12/06/102666.html#Feedback0http://m.shnenglu.com/Marcky/comments/commentRss/102666.htmlhttp://m.shnenglu.com/Marcky/services/trackbacks/102666.html鍙戜俊浜? nichloas (nil), 淇″尯: CPlusPlus
鏍? 棰? [FAQ] 浜岀淮鏁扮粍new灝忕粨
鍙戜俊绔? BBS 姘存湪娓呭崕绔?(Sat Jun  7 15:27:42 2003), 杞俊

1.
    A (*ga)[n] = new A[m][n];
    ...
    delete []ga;
緙虹偣錛歯蹇呴』鏄凡鐭?/div>
浼樼偣錛氳皟鐢ㄧ洿瑙傦紝榪炵畫鍌ㄥ瓨錛岀▼搴忕畝媧?緇忚繃嫻嬭瘯錛屾瀽鏋勫嚱鏁拌兘姝g‘璋冪敤)

2.  A** ga = new A*[m];
    for(int i = 0; i < m; i++)
        ga[i] = new A[n];
    ...
    for(int i = 0; i < m; i++)
        delete []ga[i];
    delete []ga;
緙虹偣錛氶潪榪炵畫鍌ㄥ瓨錛岀▼搴忕儲鐞愶紝ga涓篈**綾誨瀷
浼樼偣錛氳皟鐢ㄧ洿瑙傦紝n鍙互涓嶆槸宸茬煡

3.  A* ga = new A[m*n];
    ...
    delete []ga;
緙虹偣錛氳皟鐢ㄤ笉澶熺洿瑙?/div>
浼樼偣錛氳繛緇偍瀛橈紝n鍙互涓嶆槸宸茬煡

4.  vector<vector<A> > ga;
    ga.resize(m);                       //榪欎笁琛屽彲鐢ㄥ彲涓嶇敤
    for(int i = 1; i < n; i++)          //
        ga[i].resize(n);                //
    ...

緙虹偣錛氶潪榪炵畫鍌ㄥ瓨錛岃皟璇曚笉澶熸柟渚匡紝緙栬瘧閫熷害涓嬮檷錛岀▼搴忚啫鑳(瀹為檯閫熷害宸埆涓嶅ぇ)
浼樼偣錛氳皟鐢ㄧ洿瑙傦紝鑷姩鏋愭瀯涓庨噴鏀懼唴瀛橈紝鍙互璋冪敤stl鐩稿叧鍑芥暟錛屽姩鎬佸闀?/div>

5.  vector<A> ga;
    ga.resize(m*n);
鏂規(guī)硶3,4鐨勭粨鍚?/div>


6. 2鐨勬敼榪涚増(Penrose鎻愪緵錛屽湪姝ゆ劅璋?
    A** ga = new A*[m];
    ga[0] = new A[m*n];
    for(int i = 1; i < m; i++)
        ga[i] = ga[i-1]+n;
    ...
    delete [] ga[0];
    delete [] ga;
緙虹偣錛氱▼搴忕儲鐞愶紝ga涓篈**綾誨瀷
浼樼偣錛氳繛緇偍瀛橈紝璋冪敤鐩磋錛宯鍙互涓嶆槸宸茬煡



闄勶細1,2,3,6榪樻湁瀵瑰簲鐨刴alloc-free鐗堟湰
涓漢鎺ㄨ崘1鍜?,2鍙互鐢?鏉ヤ唬鏇匡紝3,5璋冪敤澶儲鐞愶紝姣曠珶婧愮▼搴忔槸鎷挎潵鐪嬬殑
涓嶆槸鎷挎潵榪愯鐨?/div>


涓嬮潰鏄竴浜涢敊璇拰娌℃垚鍔熺殑鐗堟湰

1. A* ga = new A[m][n];
  蹇呯劧閿欒

2. vector<A[n]> ga;
   ga.resize(m);

   gcc 3.2涓嬬紪璇戝け璐ワ紝涓嶇煡閬撳叾瀹冪紪璇戝櫒鏁堟灉濡備綍
   涔熶笉鐭ラ亾鏍囧噯鏄惁鍏佽

鎴戠煡閬撶殑灝辮繖浜涳紝嬈㈣繋澶у琛ュ厖錛屾寚姝?/div>




--



--

鈥?鏉ユ簮:·BBS 姘存湪娓呭崕绔?smth.org·[FROM: 162.105.216.213]
鈥?淇敼:·devilphoenix 浜?Sep  5 18:10:57 淇敼鏈枃·[FROM: 211.99.222.*]



Marcky 2009-12-06 22:01 鍙戣〃璇勮
]]>HuffmanTree鐨勫垱寤哄強緙栫爜http://m.shnenglu.com/Marcky/archive/2009/09/28/97474.htmlMarckyMarckyMon, 28 Sep 2009 09:49:00 GMThttp://m.shnenglu.com/Marcky/archive/2009/09/28/97474.htmlhttp://m.shnenglu.com/Marcky/comments/97474.htmlhttp://m.shnenglu.com/Marcky/archive/2009/09/28/97474.html#Feedback0http://m.shnenglu.com/Marcky/comments/commentRss/97474.htmlhttp://m.shnenglu.com/Marcky/services/trackbacks/97474.htmltypedef struct _HTNode {
    unsigned 
int weight;        /* 鏉冨?nbsp;*/
    unsigned 
int parent;        /* 鐖惰妭鐐圭儲寮?nbsp;*/
    unsigned 
int lchild;        /* 宸﹀瀛愮儲寮?nbsp;*/
    unsigned 
int rchild;        /* 鍙沖瀛愮儲寮?nbsp;*/
} HTNode, 
*HuffmanTree;         /* 鍔ㄦ佸垎閰嶆暟緇勫瓨鍌ㄥ搱澶浖鏍?nbsp;*/

typedef 
char **HuffmanCode;     /* 鍔ㄦ佸垎閰嶆暟緇勫瓨鍌ㄥ搱澶浖緙栫爜琛?nbsp;*/

/* 浠巋t鐨?锝瀗鐨勮妭鐐逛腑鎵懼嚭鏉冨兼渶灝忕殑涓や釜鑺傜偣錛屽垎鍒瓨浜巗1, s2涓?nbsp;*/
void Select(HuffmanTree ht, int n, int *s1, int *s2)
{
    
int i;

    
*s1 = 0;
    
*s2 = 0;
    
/*璁劇疆s1, s2鍒板紑濮嬩袱涓猵arent絳変簬0鐨勮妭鐐逛綅緗?/span>*/
    
for (i = 1; i <= n; ++i) {
        
if (*s1 != 0 && *s2 != 0)
            
break;
       
        
if (ht[i].parent == 0)
            
*s1 == 0 ? *s1 = i : *s2 = i;
    }
    
/*鎵懼嚭ht涓璸arent絳変簬0錛屼笖鏉冨兼渶灝忕殑涓や釜鑺傜偣浣嶇疆錛屽垎鍒瓨浜巗1, s2涓?/span>*/
    
for ( ; i <= n; ++i) {
        
if (ht[i].parent != 0continue;

        
if ( (ht[*s1].weight > ht[*s2].weight) && (ht[*s1].weight > ht[i].weight))
            
*s1 = i;
        
else if ( (ht[*s2].weight > ht[*s1].weight) && (ht[*s2].weight > ht[i].weight))
            
*s2 = i;
    }
}

/* 閫氳繃w瀛樺偍鐨刵涓潈鍊鹼紝鏉ュ垱寤轟竴棰楀搱澶浖鏍? ht_ptr鎸囧悜榪欓鍝堝か鏇兼爲 */
void CreateHuffmanTree(HuffmanTree *ht_ptr, int *w, int n)
{
    
int m;
    
int i;
    
int s1, s2;
    HuffmanTree p;
    
    
if (n <= 1return;
    m 
= 2 * n - 1;              /* n涓瓧絎︼紝闇瑕?n-1涓┖闂存潵瀛樺偍鏁撮huffman tree */
    
*ht_ptr = (HuffmanTree)malloc( (m + 1* sizeof(HTNode)); /* 0鍙峰崟鍏冧笉鐢?nbsp;*/

    
for (p = *ht_ptr + 1, i = 1; i <= n; ++i, ++p, ++w) { /* 鍒濆鍖栨暟緇勪腑鍓峮涓崟鍏冨瓨鍌ㄧ殑瀛楃 */
        p
->weight = *w;
        p
->parent = 0;
        p
->lchild = 0;
        p
->rchild = 0;
    }
    
for ( ; i <= m; ++i, ++p) { /* 鍒濆鍖栨暟緇勪腑鍓╀綑鐨勫崟鍏?nbsp;*/
        p
->weight = 0;
        p
->parent = 0;
        p
->lchild = 0;
        p
->rchild = 0;
    }

    
for (i = n + 1; i <= m; ++i) {
        Select(
*ht_ptr, i - 1&s1, &s2);
        
/* 璁劇疆s1, s2鐨勭埗浜蹭負i */
        (
*ht_ptr + s1)->parent = i;
        (
*ht_ptr + s2)->parent = i;
        
/* 璁劇疆i鐨勫乏瀛╁瓙涓簊1, 鍙沖瀛愪負s2 */
        (
*ht_ptr + i)->lchild = s1;
        (
*ht_ptr + i)->rchild = s2;
        
/* 璁劇疆i鐨勬潈鍊間負s1, s2涔嬪拰 */
        (
*ht_ptr + i)->weight = (*ht_ptr + s1)->weight + (*ht_ptr + s2)->weight;
    }
}

/* 瀵筯t_ptr瀛樺偍鐨勫搱澶浖鏍戠殑n涓彾瀛愯妭鐐硅繘琛屽搱澶浖緙栫爜 */
void HuffmanCoding(HuffmanTree *ht_ptr, HuffmanCode *hc_ptr, int n)
{
    
int i;
    
int start;
    
char *cd = NULL;
    
    
*hc_ptr = (HuffmanCode)malloc( (n + 1* sizeof(char *));

    cd 
= (char *)malloc(n * sizeof(char));
    cd[n 
- 1= '\0';

    
for (i = 1; i <= n; ++i) {
        start 
= n - 1;

        
int current, father;
        
for (current = i, father = (*ht_ptr + i)->parent; /* 浠庡彾瀛愯妭鐐瑰紑濮嬶紝騫跺彇寰楃埗鑺傜偣father */
             father 
!= 0;                                 /* 鐖惰妭鐐逛負0鏃跺強鍒拌揪浜嗘牴鑺傜偣 */
             current 
= father, father = (*ht_ptr + father)->parent) { /* 閫愭笎鍚戞牴鑺傜偣闈犳嫝 */
            
if ( (*ht_ptr + father)->lchild == current) /* 褰撳墠鑺傜偣涓哄乏瀛╁瓙 */
                cd[
--start] = '0';
            
else
                cd[
--start] = '1';

        }

        
*(*hc_ptr + i) = (char *)malloc( (n - start) * sizeof(char));
        strcpy(
*(*hc_ptr +i), &cd[start]);
    }
    free(cd);
}




Marcky 2009-09-28 17:49 鍙戣〃璇勮
]]>浜屽弶鏍戠殑鍒涘緩鍙婇亶鍘嗭紙閫掑綊浠g爜錛?/title><link>http://m.shnenglu.com/Marcky/archive/2009/09/24/97173.html</link><dc:creator>Marcky</dc:creator><author>Marcky</author><pubDate>Thu, 24 Sep 2009 14:33:00 GMT</pubDate><guid>http://m.shnenglu.com/Marcky/archive/2009/09/24/97173.html</guid><wfw:comment>http://m.shnenglu.com/Marcky/comments/97173.html</wfw:comment><comments>http://m.shnenglu.com/Marcky/archive/2009/09/24/97173.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/Marcky/comments/commentRss/97173.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/Marcky/services/trackbacks/97173.html</trackback:ping><description><![CDATA[<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #0000ff;">typedef enum</span><span style="color: #000000;"> _STATUS {ERROR, OK} STATUS;<br><br>typedef </span><span style="color: #0000ff;">struct</span><span style="color: #000000;"> _BiTNode {<br>    </span><span style="color: #0000ff;">char</span><span style="color: #000000;"> data;<br>    </span><span style="color: #0000ff;">struct</span><span style="color: #000000;"> _BiTNode </span><span style="color: #000000;">*</span><span style="color: #000000;">lchild;<br>    </span><span style="color: #0000ff;">struct</span><span style="color: #000000;"> _BiTNode </span><span style="color: #000000;">*</span><span style="color: #000000;">rchild;<br>} BiTNode, </span><span style="color: #000000;">*</span><span style="color: #000000;">BiTree;<br><br></span><span style="color: #008000;">/*</span><span style="color: #008000;">鍒涘緩浜屽弶鏍?/span><span style="color: #008000;">*/</span><span style="color: #000000;"><br>STATUS CreateBiTree(BiTree </span><span style="color: #000000;">*</span><span style="color: #000000;">T)<br>{</span><span style="color: #008000;">/*</span><span style="color: #008000;">鎸夊厛搴忔搴忚緭鍏ヤ簩鍙夋爲鑺傜偣鐨勫鹼紝絀烘牸琛ㄧず絀烘爲銆?/span><span style="color: #008000;">*/</span><span style="color: #000000;"><br>    </span><span style="color: #0000ff;">char</span><span style="color: #000000;"> ch;<br>    <br>    scanf(</span><span style="color: #000000;">"</span><span style="color: #000000;">%c</span><span style="color: #000000;">"</span><span style="color: #000000;">, </span><span style="color: #000000;">&</span><span style="color: #000000;">ch);<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (ch </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #000000;">'</span><span style="color: #000000;"> </span><span style="color: #000000;">'</span><span style="color: #000000;">) { <br>        </span><span style="color: #000000;">*</span><span style="color: #000000;">T </span><span style="color: #000000;">=</span><span style="color: #000000;"> NULL;<br>    } </span><span style="color: #0000ff;">else</span><span style="color: #000000;"> {<br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> ( </span><span style="color: #000000;">!</span><span style="color: #000000;">(</span><span style="color: #000000;">*</span><span style="color: #000000;">T </span><span style="color: #000000;">=</span><span style="color: #000000;"> (BiTNode </span><span style="color: #000000;">*</span><span style="color: #000000;">)malloc(</span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(BiTNode)))) exit(</span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;">);<br>        (</span><span style="color: #000000;">*</span><span style="color: #000000;">T)</span><span style="color: #000000;">-></span><span style="color: #000000;">data </span><span style="color: #000000;">=</span><span style="color: #000000;"> ch;                     </span><span style="color: #008000;">//</span><span style="color: #008000;">鐢熸垚鏍硅妭鐐?/span><span style="color: #008000;"><br></span><span style="color: #000000;">        CreateBiTree(</span><span style="color: #000000;">&</span><span style="color: #000000;">((</span><span style="color: #000000;">*</span><span style="color: #000000;">T)</span><span style="color: #000000;">-></span><span style="color: #000000;">lchild));       </span><span style="color: #008000;">//</span><span style="color: #008000;">鏋勯犲乏瀛愭爲</span><span style="color: #008000;"><br></span><span style="color: #000000;">        CreateBiTree(</span><span style="color: #000000;">&</span><span style="color: #000000;">((</span><span style="color: #000000;">*</span><span style="color: #000000;">T)</span><span style="color: #000000;">-></span><span style="color: #000000;">rchild));       </span><span style="color: #008000;">//</span><span style="color: #008000;">鏋勯犲彸瀛愭爲</span><span style="color: #008000;"><br></span><span style="color: #000000;">    }<br>    </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> OK;<br>}<br><br></span><span style="color: #008000;">/*</span><span style="color: #008000;">涓簭閬嶅巻浜屽弶鏍?/span><span style="color: #008000;">*/</span><span style="color: #000000;"><br>STATUS InOrderTraverse(BiTree </span><span style="color: #000000;">*</span><span style="color: #000000;">T)<br>{<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (</span><span style="color: #000000;">*</span><span style="color: #000000;">T) {<br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (InOrderTraverse(</span><span style="color: #000000;">&</span><span style="color: #000000;">((</span><span style="color: #000000;">*</span><span style="color: #000000;">T)</span><span style="color: #000000;">-></span><span style="color: #000000;">lchild)))<br>            printf(</span><span style="color: #000000;">"</span><span style="color: #000000;">%c </span><span style="color: #000000;">"</span><span style="color: #000000;">, (</span><span style="color: #000000;">*</span><span style="color: #000000;">T)</span><span style="color: #000000;">-></span><span style="color: #000000;">data);<br>            </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (InOrderTraverse(</span><span style="color: #000000;">&</span><span style="color: #000000;">((</span><span style="color: #000000;">*</span><span style="color: #000000;">T)</span><span style="color: #000000;">-></span><span style="color: #000000;">rchild)))<br>                </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> OK;<br>        </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> ERROR;<br>    } </span><span style="color: #0000ff;">else</span><span style="color: #000000;"> {<br>        </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> OK;<br>    }<br>}</span></div> <br> <img src ="http://m.shnenglu.com/Marcky/aggbug/97173.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/Marcky/" target="_blank">Marcky</a> 2009-09-24 22:33 <a href="http://m.shnenglu.com/Marcky/archive/2009/09/24/97173.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Python鐨勫鍏冭祴鍊兼柟寮忓疄鐜頒氦鎹袱涓彉閲忕殑鍊?/title><link>http://m.shnenglu.com/Marcky/archive/2009/08/26/94473.html</link><dc:creator>Marcky</dc:creator><author>Marcky</author><pubDate>Wed, 26 Aug 2009 08:44:00 GMT</pubDate><guid>http://m.shnenglu.com/Marcky/archive/2009/08/26/94473.html</guid><wfw:comment>http://m.shnenglu.com/Marcky/comments/94473.html</wfw:comment><comments>http://m.shnenglu.com/Marcky/archive/2009/08/26/94473.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/Marcky/comments/commentRss/94473.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/Marcky/services/trackbacks/94473.html</trackback:ping><description><![CDATA[鍒╃敤Python鐨勫鍏冭祴鍊兼柟寮忓彲浠ユ棤欏諱復鏃朵腑闂村彉閲忓疄鐜頒袱涓彉閲忓肩殑浜ゆ崲銆?br>浠g爜錛?br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">(x, y) </span><span style="color: #000000;">=</span><span style="color: #000000;"> (</span><span style="color: #000000;">1</span><span style="color: #000000;">, </span><span style="color: #000000;">2</span><span style="color: #000000;">) </span><span style="color: #008000;">#</span><span style="color: #008000;">x = 1, y = 2</span><span style="color: #008000;"><br></span><span style="color: #000000;">(x, y) </span><span style="color: #000000;">=</span><span style="color: #000000;"> (y, x) </span><span style="color: #008000;">#</span><span style="color: #008000;">x = 2, y = 1</span></div> <br><img src ="http://m.shnenglu.com/Marcky/aggbug/94473.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/Marcky/" target="_blank">Marcky</a> 2009-08-26 16:44 <a href="http://m.shnenglu.com/Marcky/archive/2009/08/26/94473.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>system V IPC 鈥斺?鍏變韓鍐呭瓨(涓?http://m.shnenglu.com/Marcky/archive/2009/08/20/93911.htmlMarckyMarckyThu, 20 Aug 2009 06:57:00 GMThttp://m.shnenglu.com/Marcky/archive/2009/08/20/93911.htmlhttp://m.shnenglu.com/Marcky/comments/93911.htmlhttp://m.shnenglu.com/Marcky/archive/2009/08/20/93911.html#Feedback0http://m.shnenglu.com/Marcky/comments/commentRss/93911.htmlhttp://m.shnenglu.com/Marcky/services/trackbacks/93911.html
浠g爜濡備笅錛?br>
#include <stdio.h>
#include 
<stdlib.h>
#include 
<string.h>

#include 
<unistd.h>
#include 
<sys/types.h>

#include 
<sys/wait.h>
#include 
<fcntl.h>

#include 
<sys/ipc.h>
#include 
<sys/shm.h>

#define SHM_SIZE 1024            /* shared memory size(bytes) */
#define SHM_MODE 0600            /* user read/write */

#define WRITE_LOCK(fd) regLock((fd), F_SETLKW, F_WRLCK, 0, SEEK_SET, 0) 
#define UN_LOCK(fd) regLock((fd), F_SETLK, F_UNLCK, 0, SEEK_SET, 0) 
/* 鍒涘緩涓涓枃浠?nbsp;*/
int createFile()
{
    
int fd;

    
if ( (fd = open("/tmp/emptyfile4shm", O_RDWR | O_CREAT, 0666)) < 0) {
        fprintf(stderr, 
"Create a empty file failed!\n");
        exit(EXIT_FAILURE);
    }

    
return fd;
}
/* 鍦ㄦ枃浠秄d涓婂姞閿佹垨瑙i攣*/
int regLock(int fd, int cmd, int type, off_t offset, int whence, off_t len)
{
    
struct flock lock;

    
lock.l_type = type;         /* lock type: F_RDLCK, F_WRLCK, F_UNLCK */
    
lock.l_start = offset;      /* byte offset relative to l_whence */
    
lock.l_whence = whence;    /* it's value : SEEK_SET, SEEK_CUR, SEEK_END */
    
lock.l_len = len;           /* bytes (0 means to EOF) */

    
return fcntl(fd, cmd, &lock);
}

int main(void)
{
    
int shmid;
    
int filed;
    pid_t pid;
    
char *shmptr = NULL;

    filed 
= createFile();

    
if ( (shmid = shmget(IPC_PRIVATE, SHM_SIZE, SHM_MODE)) < 0) { /* Create shared memory */
        fprintf(stderr, 
"Create shared memory failed!\n");
        exit(EXIT_FAILURE);
    }

    
if ( (pid = fork()) < 0) {  /* Create a child process */
        fprintf(stderr, 
"Create child process failed!\n");
        exit(EXIT_FAILURE);
    }

    
if (pid == 0) {             /* In child process */
        
if ( (shmptr = shmat(shmid, 00)) == (void *)-1) {
            fprintf(stderr, 
"Attached shared memory failed!\n");
            exit(EXIT_FAILURE);
        }
        
while (1) {
            WRITE_LOCK(filed);  
/* add a write lock to filed */
            
/* shared memory 鍓╀綑鐨勭┖闂翠笉鑳藉瓨鍌?Child"瀛楃涓插拰緇撴潫絎?鏃跺氨閫鍑哄驚鐜?nbsp;*/
            
if (SHM_SIZE - strlen(shmptr) < strlen("Child"+ 1break
            strcat(shmptr, 
"C"); /* 鐢變簬鍔犱簡閿侊紝姣忎釜Child灝嗕細榪炵畫鍑虹幇 */
            strcat(shmptr, 
"h");
            strcat(shmptr, 
"i");
            strcat(shmptr, 
"l");
            strcat(shmptr, 
"d");
            UN_LOCK(filed);     
/* release lock */
        }
        printf(
"child process:\n\t%s\n", shmptr); /* child process print shared memory */
            
        exit(
0);
    }

    
/* In parent process */
    
if ( (shmptr = shmat(shmid, 00)) == (void *)-1) { /* Attached shared memory */
        fprintf(stderr, 
"Attached shared memory failed!\n");
        exit(EXIT_FAILURE);
    }
    
    
while (1) {
        WRITE_LOCK(filed);
        
/* shared memory 鍓╀綑鐨勭┖闂翠笉鑳藉瓨鍌?Parent"瀛楃涓插拰緇撴潫絎?鏃跺氨閫鍑哄驚鐜?nbsp;*/
        
if (SHM_SIZE - strlen(shmptr) < strlen("Parent"+ 1break;
        strcat(shmptr, 
"P");/* 鐢變簬鍔犱簡閿侊紝姣忎釜Parent灝嗕細榪炵畫鍑虹幇 */
        strcat(shmptr, 
"a");
        strcat(shmptr, 
"r");
        strcat(shmptr, 
"e");
        strcat(shmptr, 
"n");
        strcat(shmptr, 
"t");
        UN_LOCK(filed);
    }
    printf(
"parent process:\n\t%s\n", shmptr); /* parent print shared memory */

    wait(
0);
    exit(
0);
}
    
            
    
    




Marcky 2009-08-20 14:57 鍙戣〃璇勮
]]>
system V IPC 鈥斺?鍏變韓鍐呭瓨(涓?http://m.shnenglu.com/Marcky/archive/2009/08/20/93909.htmlMarckyMarckyThu, 20 Aug 2009 06:48:00 GMThttp://m.shnenglu.com/Marcky/archive/2009/08/20/93909.htmlhttp://m.shnenglu.com/Marcky/comments/93909.htmlhttp://m.shnenglu.com/Marcky/archive/2009/08/20/93909.html#Feedback0http://m.shnenglu.com/Marcky/comments/commentRss/93909.htmlhttp://m.shnenglu.com/Marcky/services/trackbacks/93909.html
linux鍐呮牳瀹氫箟鐨剆hared memory緇撴瀯shmid_ds濡備笅錛?br>
struct shmid_ds {
    
struct ipc_perm  shm_perm;  /*鏉冮檺*/
    size_t           shm_segsz; 
/*澶у皬*/
    pid_t            shm_lpid;  
    pid_t            shm_cpid;  
/*鍒涘緩鑰卲id*/
    shmatt_t         shm_nattch;
/*榪炴帴鍒版孌靛唴瀛樼殑榪涚▼鏁?/span>*/
    time_t           shm_atime;
    time_t           shm_dtime;
    time_t           shm_ctime;
    
};

1銆佸垱寤烘垨浣跨敤涓孌靛叡浜唴瀛樹嬌鐢╯hmget鍑芥暟錛屾鍑芥暟灝嗚繑鍥炲叡浜唴瀛樻爣紺虹銆?br>
#include <sys/shm.h>
int shmget(key_t key, size_t size, int flag);
濡傛灉key鍙栧間負IPC_PRIVATE鎴栬卥ey褰撳墠涓哄拰鐗瑰畾綾誨瀷鐨処PC緇撴瀯鐩哥粨鍚堬紝騫朵笖flag鎸囧畾浜咺PC_CREAT浣嶏紝鍒欏垱寤轟竴涓柊鐨剆hare memory緇撴瀯銆?br>size涓哄叡浜唴瀛樻鐨勯暱搴︼紙瀛楄妭錛夈?br>
2銆佸涓涓叡浜唴瀛樻榪涜鎿嶄綔浣跨敤shmctl銆?br>
#include <sys/shm.h>
int shmctl(int shmid, int cmd, struct shmid_ds *buf);
shmid鎸囧畾闇瑕佹搷浣滅殑shared memory
cmd鎸囧畾闇瑕佽繘琛岀殑鎿嶄綔
       IPC_STAT鍙栧緱姝ゆ鐨剆hmid_ds緇撴瀯鏀懼叆buf涓?br>       IPC_SET鐢╞uf鐨勫艱緗孌典腑鐨勶細shm_perm.uid錛宻hm_perm.gid錛宻hm_perm.mode銆?br>       IPC_RMID浠庣郴緇熶腑鍒犻櫎姝ゅ叡浜唴瀛樻銆?br>       SHM_LOCK灝嗗叡浜唴瀛橀攣瀹氬埌鍐呭瓨涓?br>       SHM_UNLOCK瑙i攣鍏變韓鍐呭瓨孌點?br>
3銆佸皢涓涓叡浜唴瀛樻榪炴帴鍒拌嚜宸辯殑鍦板潃絀洪棿浣跨敤shmat錛?br>
#include <sys/shm.h>
void *shmat(int shmid, const void *addr, int flag);
鎺ㄨ崘addr鍙?鍊鹼紝灝嗘孌佃繛鎺ュ埌鍐呮牳閫夋嫨鐨勭涓涓彲鐢ㄧ殑鍦板潃涓娿傚鍔犵▼搴忕殑鍙Щ妞嶆с?br>
4銆佸鍏變韓鍐呭瓨鎿嶄綔緇撴潫鍚庯紝瑕佽劚紱昏孌電敤shmdt錛?br>
#include <sys/shm.h>
int shmdt(void *addr);
addr鏄痵hmat鐨勮繑鍥炲箋?br>


Marcky 2009-08-20 14:48 鍙戣〃璇勮
]]>
瀹夊叏璁塊棶鏁扮粍鐨勬寚閽堢被妯℃澘http://m.shnenglu.com/Marcky/archive/2009/08/13/93233.htmlMarckyMarckyThu, 13 Aug 2009 10:29:00 GMThttp://m.shnenglu.com/Marcky/archive/2009/08/13/93233.htmlhttp://m.shnenglu.com/Marcky/comments/93233.htmlhttp://m.shnenglu.com/Marcky/archive/2009/08/13/93233.html#Feedback0http://m.shnenglu.com/Marcky/comments/commentRss/93233.htmlhttp://m.shnenglu.com/Marcky/services/trackbacks/93233.html
#include <iostream>
#include 
<stdexcept>

using namespace std;

template
<typename T>
class Ptr2T {
public:
//鏋勯犲嚱鏁幫紝褰㈠弬涓烘暟緇勮搗濮嬪湴鍧鍜屽ぇ灝?/span>
    Ptr2T(T *p, int size)
        : m_p(p), m_array(p), m_size(size) { };

    Ptr2T
& operator++();                //鍓嶇紑++
    const Ptr2T operator++(int);        //鍚庣紑++

    Ptr2T
& operator--();                //鍓嶇紑--
    const Ptr2T operator--(int);        //鍚庣紑--

    Ptr2T
& operator+=(int n);
    Ptr2T
& operator -=(int n);
//瀹夊叏鐨勬暟緇勫厓绱犺闂搷浣?/span>
    T& operator*() const;  
private:
    T 
*m_p;           //璁塊棶鏁扮粍鐨勬寚閽?/span>
    T *m_array;       //淇濆瓨鏁扮粍鐨勮搗濮嬪湴鍧
    int m_size;       //淇濆瓨鏁扮粍鐨勫ぇ灝?/span>
};

template
<typename T>
inline Ptr2T
<T>& Ptr2T<T>::operator++()
{
    m_p 
+= 1;
    
return *this;
}

template
<typename T>
inline 
const Ptr2T<T> Ptr2T<T>::operator++(int)
{
    Ptr2T current 
= *this;
    
++(*this);       //鐢ㄩ噸杞界殑鍓嶇紑++鏉ュ疄鐜?/span>
    
    
return current;
}

template
<typename T>
inline Ptr2T
<T>& Ptr2T<T>::operator--()
{
    m_p 
-= 1;
    
return *this;
}

template
<typename T>
inline 
const Ptr2T<T> Ptr2T<T>::operator--(int)
{
    Ptr2T current 
= *this;
    
--(*this);       //鐢ㄩ噸杞界殑鍓嶇紑--鏉ュ疄鐜?/span>

    
return current;
}

template
<typename T>
inline T
& Ptr2T<T>::operator*() const
{
    
if (m_p < m_array || m_p > m_array + m_size - 1) {  //瓚婄晫媯鏌?/span>
        throw out_of_range("out of range");
    }

    
return *m_p;
}

template
<typename T>
inline Ptr2T
<T>& Ptr2T<T>::operator+=(int n)
{
    m_p 
+= n;
    
return *this;
}

template
<typename T>
inline Ptr2T
<T>& Ptr2T<T>::operator-=(int n)
{
    m_p 
-= n;
    
return *this;
}

template
<typename T>
Ptr2T
<T> operator+(const Ptr2T<T> &p, const int n)
{
    
return Ptr2T<T>(p) += n;   //鐢ㄩ噸杞界殑+=鏉ュ疄鐜?/span>
}

template
<typename T>
Ptr2T
<T> operator+(const int n, const Ptr2T<T> &p)
{
    
return p + n;
}

template
<typename T>
Ptr2T
<T> operator-(const Ptr2T<T> &p, const int n)
{
    
return Ptr2T<T>(p) -= n;  //鐢ㄩ噸杞界殑-=鏉ュ疄鐜?/span>
}

//浣跨敤鏂規(guī)硶
int main(void)
{
    
char a[5= {'a''b''c''d''e'};
    
int b[5= {12345}; 

    Ptr2T
<char> pc(a, 5);
    Ptr2T
<int> pi(b, 5);

    cout 
<< *pc++ << endl;
    pi
--;
    pi 
+= 2;
    cout 
<< *(pi - 1<< endl;

    
*++pi = 100;
    cout 
<< *pi << endl;
    
    
return 0;
}



Marcky 2009-08-13 18:29 鍙戣〃璇勮
]]>
鏄劇ず鏋勯犲嚱鏁頒笌杞崲榪愮畻絎︾殑鍚堜綔http://m.shnenglu.com/Marcky/archive/2009/08/13/93193.htmlMarckyMarckyThu, 13 Aug 2009 06:39:00 GMThttp://m.shnenglu.com/Marcky/archive/2009/08/13/93193.htmlhttp://m.shnenglu.com/Marcky/comments/93193.htmlhttp://m.shnenglu.com/Marcky/archive/2009/08/13/93193.html#Feedback0http://m.shnenglu.com/Marcky/comments/commentRss/93193.htmlhttp://m.shnenglu.com/Marcky/services/trackbacks/93193.html
class Year {
    
int m_y;
public:
//explicit闄愬埗int鍒癥ear鐨勯殣寮忚漿鎹?/span>
    explicit Year(int y)
        : y(m_y) { }
//Year鍒癷nt鐨勭被鍨嬭漿鎹?nbsp;  
    operator int() const 
        { 
return m_y; }
    
//other funtion
}


class Date {
public :
    Date(
int d, Month m, Year y);
    
//
};

Date d1(
1987, feb, 21);   //error, 21涓嶈兘闅愬紡杞崲涓篩ear
Date d2(21, feb, Year(1987)); //ok



鍦ㄨ繖閲孻ear灝卞彧鏄寘瑁逛綇浜唅nt錛屽int鎻愪緵涓灞備繚鎶よ屽凡銆傜敱浜巓perator int()鐨勫瓨鍦紝鍙闇瑕侊紝Year鍙互闅愬紡鐨勮漿鍖栦負int鍑虹幇榪愮畻琛ㄨ揪寮忎腑鍙傚姞榪愮畻銆傝岄氳繃緇欐瀯閫犲嚱鏁板0鏄庝負explicit錛屽氨鑳藉淇濊瘉錛宨nt鍒癥ear鐨勮漿鍖栧彧鑳藉湪鏄庣‘鏃犺鐨勬儏鍐佃繘琛岋紝閬垮厤浜嗘剰澶栫殑璧嬪箋?br>
鏄劇ず鏋勯犲嚱鏁板拰杞崲榪愮畻絎︾殑鍚堜綔錛岃Year鍙互褰搃nt浣跨敤錛屽悓鏃跺張瀵筜ear榪涜涓瀹氱殑淇濇姢銆傘傘?br>



Marcky 2009-08-13 14:39 鍙戣〃璇勮
]]>
Allocating Arrays Using Placement new (zz)http://m.shnenglu.com/Marcky/archive/2009/08/13/93110.htmlMarckyMarckyWed, 12 Aug 2009 16:48:00 GMThttp://m.shnenglu.com/Marcky/archive/2009/08/13/93110.htmlhttp://m.shnenglu.com/Marcky/comments/93110.htmlhttp://m.shnenglu.com/Marcky/archive/2009/08/13/93110.html#Feedback0http://m.shnenglu.com/Marcky/comments/commentRss/93110.htmlhttp://m.shnenglu.com/Marcky/services/trackbacks/93110.htmlnew enables you to construct an object or an array of objects at a predetermined memory position. This version is called placement new and has many useful applications, including building a custom-made memory pool or a garbage collector. Additionally, it can be used in mission-critical applications because there's no danger of allocation failure; the memory that's used by placement new has already been allocated. Placement new is also faster because the construction of an object on a preallocated buffer takes less time.

You already know how to use placement new to allocate a single object on a predetermined memory address. However, some programming tasks require the allocation of arrays on a predetermined memory address. Here's how you do it.

Placement new Overview

Mobile devices, embedded systems and custom garbage collectors are only a few instances of programming environments that may require placement new allocation of arrays. Before I discuss the details of such array allocations, let's remind ourselves briefly how scalar (i.e. non-array) placement new works.

The scalar version of placement new takes a user-supplied address on which it constructs a single object. Unlike the ordinary version of the new operator, placement new doesn't allocate storage for the object; it merely constructs the object on the memory address you provide:

#include <new> //required for using placement new
class Widget {
public:
    Widget();
    
virtual ~Widget
    
virtual void Draw();
};
char* buf=new char [sizeof (Widget)];//preallocate
Widget* widget= new(buf) Widget; //construct Widget on buf
widget->Draw(); //use Widget

To destroy widget you first have to invoke its destructor explicitly:

widget->~Widget(); //explicit destructor invocation

Next, reclaim the raw memory like this:

delete[] buf;

Array Allocation

Allocating arrays with placement new follows the same steps more or less, but you have to pay attention to additional nuances. Here is a step-by-step guide:

First, allocate a buffer large enough to hold an array of the desired type:

const int ARRSIZE = 15;
char * buf= new [sizeof(Widget)*ARRSIZE];

Don't be tempted to calculate the size manually; always use sizeof to ensure that the buffer is properly aligned and has the right size.

Next, construct an array of ARRSIZE objects on the buffer using placement new[] :

Widget* widgets=new(buf) Widget[ARRSIZE];//construct an array

You can now use the allocated array as usual:

for (int i=0; i<ARRSIZE; i++)
{
 widgets[i].Draw();
}
Make sure that your target class -- Widget in this example -- has a public default constructor. Otherwise, it would be impossible to create arrays thereof.

Destroying the Array

To destroy such an array allocated by placement new you have to call the destructor for each element explicitly:

int i=ARRSIZE;
while (i)
    widgets[
--i].~Widget();

The while -loop uses a descending order to preserve the canonical destruction order of C++ -- the object that was constructed last must be destroyed first. To comply with this requirement, the element with the highest index is destroyed first.

Finally, you release the raw memory on which the array resided by calling delete[] :

delete[] buf;

Performance Tuning

The array placement new has a potential performance problem: it initializes every element in the array unconditionally. If your app deals with large arrays, this isn't the most efficient way. In some apps only a portion of the array is actually used, and in other apps the elements are assigned a different value immediately after their construction. In these cases, you want to postpone, or even completely avoid, the automatic initialization of array elements. To avoid the initialization of placement new arrays, follow the following steps:

As before, begin with an allocation of a raw buffer with the appropriate size. This time however, use the global operator new instead of the new operator:

Widget * warr=
static_cast
<Widget*> (::operator new ( sizeof(Widget)* ARRSIZE));

The global operator new , very much like C's malloc() , merely allocates raw bytes of memory from the free-store, without initializing them. It returns void * rather than Widget* which is why you need to cast the result explicitly.

At this stage, warr is a pointer to raw memory. You can't access its elements because they haven't been initialized yet. To initialize individual elements, call placement new once more, for each element you want initialized:

void assign(Widget arr[], size_t & sz,  const Widget& init)
{
    
new (&arr[sz++]) Widget (init); //invoke copy ctor
}

assign() passes the address of an individual element to placement new which in turn invokes Widget 's copy constructor. The copy-constructor initializes that element with init . Using this technique, you can initialize elements selectively, leaving the rest of the array uninitialized.

To destroy such an array, invoke the destructor of every initialized object. Then call the global operator delete to reclaim the raw storage:

void destroy(Widget arr[], size_t & sz)
{
    
while (sz)
    {
        arr[
--sz].~Widget();//destroy all initialized elements
    }
     ::
operator delete (arr); //reclaim raw storage
}

Summary

The techniques I've presented here are bug prone. Therefore, they should be encapsulated in higher-level classes that hide the implementation details from users. These techniques aren't rarely-used as they might seem. STL allocators use them under the hood to avoid object initialization and minimize reallocations.





Marcky 2009-08-13 00:48 鍙戣〃璇勮
]]>
涓涓狿ython鏂囨湰澶勭悊紼嬪簭http://m.shnenglu.com/Marcky/archive/2009/07/22/90839.htmlMarckyMarckyWed, 22 Jul 2009 08:33:00 GMThttp://m.shnenglu.com/Marcky/archive/2009/07/22/90839.htmlhttp://m.shnenglu.com/Marcky/comments/90839.htmlhttp://m.shnenglu.com/Marcky/archive/2009/07/22/90839.html#Feedback0http://m.shnenglu.com/Marcky/comments/commentRss/90839.htmlhttp://m.shnenglu.com/Marcky/services/trackbacks/90839.htmlsome
are
born
great  闃呰鍏ㄦ枃

Marcky 2009-07-22 16:33 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
      <noscript id="pjuwb"></noscript>
            <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
              <dd id="pjuwb"></dd>
              <abbr id="pjuwb"></abbr>
              亚洲第一主播视频| 国产一区二区无遮挡| 欧美日韩国产免费观看| 欧美怡红院视频| 欧美精品激情| 在线观看国产日韩| 麻豆精品一区二区av白丝在线| 国产欧美精品国产国产专区| 99国产精品久久久久久久久久| 久久久噜噜噜| 亚洲人成网站影音先锋播放| 久久久久久9| 国产精品人人做人人爽人人添| 亚洲破处大片| 亚洲国产精品久久久久婷婷老年| 欧美在线观看视频在线| 国产精品美女久久久久久久| 91久久精品国产| 亚洲第一黄网| 男人天堂欧美日韩| 91久久精品国产91性色| 亚洲国产精品久久久久| 蜜乳av另类精品一区二区| 国产深夜精品福利| 日韩一区二区精品葵司在线| 亚洲日产国产精品| 欧美激情精品久久久久久免费印度| 伊人精品视频| 91久久久久久久久| 欧美精选午夜久久久乱码6080| 亚洲免费av网站| 久久中文欧美| 欧美在线精品一区| 精品二区久久| 欧美大片国产精品| 欧美美女操人视频| 欧美专区一区二区三区| 欧美专区在线观看| 在线免费观看成人网| 99精品国产高清一区二区| 欧美日韩在线一区二区| 亚洲综合视频一区| 久久精品女人的天堂av| 亚洲福利免费| 亚洲精品资源| 国产综合视频| 欧美激情精品久久久久久大尺度 | 亚洲丶国产丶欧美一区二区三区 | 在线综合亚洲| 国内综合精品午夜久久资源| 欧美成人官网二区| 欧美日韩大陆在线| 久久超碰97中文字幕| 久久亚洲春色中文字幕| 亚洲精选在线观看| 亚洲亚洲精品在线观看 | 亚洲理论电影网| 亚洲成人自拍视频| 欧美激情亚洲另类| 亚洲深夜影院| 亚洲国产精品女人久久久| 亚洲大片在线| 久久精品一区蜜桃臀影院| 99香蕉国产精品偷在线观看| 久久婷婷一区| 国产亚洲精品成人av久久ww| 在线亚洲免费| 久久夜色精品国产亚洲aⅴ| 亚洲一区中文字幕在线观看| 欧美日韩一区在线播放| 亚洲免费av片| 亚洲黑丝在线| 欧美精品福利| 国模一区二区三区| 久久久久久国产精品mv| 欧美一区二区三区在线视频| 国产精品视频一区二区三区| 亚洲欧美日韩国产成人| 99re热精品| 久久露脸国产精品| 亚洲大胆视频| 亚洲大片精品永久免费| 免费不卡欧美自拍视频| 亚洲人成网站999久久久综合| 欧美一区二区三区另类| 午夜精品久久久久久久白皮肤| 国产精品午夜国产小视频| 欧美一区二区三区四区在线观看地址 | 99国产精品久久久| 99精品欧美一区二区三区| 欧美日韩亚洲国产精品| 亚洲一区二区3| 亚洲深夜福利在线| 国产精品乱子乱xxxx| 久久精品二区| 午夜精品网站| 激情综合久久| 亚洲国产精品999| 欧美日韩四区| 久久精品国产精品亚洲精品| 中文国产成人精品久久一| 国产日韩1区| 亚洲网站在线| 亚洲综合首页| 日韩写真在线| 久久久久久91香蕉国产| 香蕉久久国产| 欧美日本一区| 国产日韩欧美在线一区| 欧美国产在线电影| 亚洲欧洲在线一区| 你懂的一区二区| 亚洲精品中文字幕在线| 欧美丰满少妇xxxbbb| 国产欧美一级| 一区二区三欧美| 亚洲区第一页| 久久一区中文字幕| 久久久久久久久岛国免费| 国产精品sm| 亚洲精品免费观看| 亚洲国内高清视频| 久久精品观看| 久久狠狠亚洲综合| 国产精品免费视频xxxx| 99精品热视频只有精品10| 亚洲精品日韩一| 另类国产ts人妖高潮视频| 快播亚洲色图| 黄色av一区| 久久www免费人成看片高清| 久久激情久久| 国产日韩欧美制服另类| 亚洲男同1069视频| 午夜欧美精品| 国产精品伊人日日| 亚洲一区二区影院| 久久成人18免费网站| 国产亚洲成av人在线观看导航| 亚洲欧美日本日韩| 欧美在线精品一区| 国内外成人免费激情在线视频| 欧美亚洲在线播放| 久久男女视频| 亚洲国产精品一区二区www| 美女尤物久久精品| 亚洲激情校园春色| 亚洲天堂男人| 国产精品视频一二三| 久久成人在线| 最新亚洲一区| 亚洲综合导航| 国产一区二区丝袜高跟鞋图片| 久久色在线观看| 亚洲裸体在线观看| 午夜精品一区二区三区四区 | 久久久久久久久蜜桃| 老司机午夜精品视频在线观看| 精品不卡视频| 欧美人与禽性xxxxx杂性| 亚洲午夜激情免费视频| 久久国产欧美日韩精品| 亚洲成人自拍视频| 欧美老女人xx| 午夜久久99| 91久久精品国产| 欧美一区二区三区四区夜夜大片 | 免费在线视频一区| 亚洲美女精品一区| 国产美女高潮久久白浆| 狠狠干狠狠久久| 亚洲开发第一视频在线播放| 一区二区日韩精品| 国内精品写真在线观看| 欧美国产乱视频| 午夜亚洲一区| 亚洲精品一区二区三区婷婷月 | 亚洲国产另类久久久精品极度| 一区二区欧美激情| 国内精品视频在线播放| 欧美日韩性视频在线| 久久人91精品久久久久久不卡 | 亚洲已满18点击进入久久| 欧美1区免费| 欧美在现视频| 一本一本大道香蕉久在线精品| 狠狠色狠色综合曰曰| 国产精品福利在线观看| 美女主播精品视频一二三四| 亚洲一区综合| 日韩一级黄色av| 亚洲国产日韩欧美| 久久米奇亚洲| 性欧美videos另类喷潮| 欧美日本在线| 久久夜色精品一区| 欧美在线国产精品| 欧美一区二区三区免费观看 | 亚洲国产第一| 模特精品在线|