锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产麻豆9l精品三级站,亚洲欧美春色,亚洲全黄一级网站http://www.shnenglu.com/Marcky/archive/2009/12/06/102666.htmlMarckyMarckySun, 06 Dec 2009 14:01:00 GMThttp://www.shnenglu.com/Marcky/archive/2009/12/06/102666.htmlhttp://www.shnenglu.com/Marcky/comments/102666.htmlhttp://www.shnenglu.com/Marcky/archive/2009/12/06/102666.html#Feedback0http://www.shnenglu.com/Marcky/comments/commentRss/102666.htmlhttp://www.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://www.shnenglu.com/Marcky/archive/2009/09/28/97474.htmlMarckyMarckyMon, 28 Sep 2009 09:49:00 GMThttp://www.shnenglu.com/Marcky/archive/2009/09/28/97474.htmlhttp://www.shnenglu.com/Marcky/comments/97474.htmlhttp://www.shnenglu.com/Marcky/archive/2009/09/28/97474.html#Feedback0http://www.shnenglu.com/Marcky/comments/commentRss/97474.htmlhttp://www.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://www.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://www.shnenglu.com/Marcky/archive/2009/09/24/97173.html</guid><wfw:comment>http://www.shnenglu.com/Marcky/comments/97173.html</wfw:comment><comments>http://www.shnenglu.com/Marcky/archive/2009/09/24/97173.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/Marcky/comments/commentRss/97173.html</wfw:commentRss><trackback:ping>http://www.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://www.shnenglu.com/Marcky/aggbug/97173.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/Marcky/" target="_blank">Marcky</a> 2009-09-24 22:33 <a href="http://www.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://www.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://www.shnenglu.com/Marcky/archive/2009/08/26/94473.html</guid><wfw:comment>http://www.shnenglu.com/Marcky/comments/94473.html</wfw:comment><comments>http://www.shnenglu.com/Marcky/archive/2009/08/26/94473.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/Marcky/comments/commentRss/94473.html</wfw:commentRss><trackback:ping>http://www.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://www.shnenglu.com/Marcky/aggbug/94473.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/Marcky/" target="_blank">Marcky</a> 2009-08-26 16:44 <a href="http://www.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://www.shnenglu.com/Marcky/archive/2009/08/20/93911.htmlMarckyMarckyThu, 20 Aug 2009 06:57:00 GMThttp://www.shnenglu.com/Marcky/archive/2009/08/20/93911.htmlhttp://www.shnenglu.com/Marcky/comments/93911.htmlhttp://www.shnenglu.com/Marcky/archive/2009/08/20/93911.html#Feedback0http://www.shnenglu.com/Marcky/comments/commentRss/93911.htmlhttp://www.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://www.shnenglu.com/Marcky/archive/2009/08/20/93909.htmlMarckyMarckyThu, 20 Aug 2009 06:48:00 GMThttp://www.shnenglu.com/Marcky/archive/2009/08/20/93909.htmlhttp://www.shnenglu.com/Marcky/comments/93909.htmlhttp://www.shnenglu.com/Marcky/archive/2009/08/20/93909.html#Feedback0http://www.shnenglu.com/Marcky/comments/commentRss/93909.htmlhttp://www.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://www.shnenglu.com/Marcky/archive/2009/08/13/93233.htmlMarckyMarckyThu, 13 Aug 2009 10:29:00 GMThttp://www.shnenglu.com/Marcky/archive/2009/08/13/93233.htmlhttp://www.shnenglu.com/Marcky/comments/93233.htmlhttp://www.shnenglu.com/Marcky/archive/2009/08/13/93233.html#Feedback0http://www.shnenglu.com/Marcky/comments/commentRss/93233.htmlhttp://www.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://www.shnenglu.com/Marcky/archive/2009/08/13/93193.htmlMarckyMarckyThu, 13 Aug 2009 06:39:00 GMThttp://www.shnenglu.com/Marcky/archive/2009/08/13/93193.htmlhttp://www.shnenglu.com/Marcky/comments/93193.htmlhttp://www.shnenglu.com/Marcky/archive/2009/08/13/93193.html#Feedback0http://www.shnenglu.com/Marcky/comments/commentRss/93193.htmlhttp://www.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://www.shnenglu.com/Marcky/archive/2009/08/13/93110.htmlMarckyMarckyWed, 12 Aug 2009 16:48:00 GMThttp://www.shnenglu.com/Marcky/archive/2009/08/13/93110.htmlhttp://www.shnenglu.com/Marcky/comments/93110.htmlhttp://www.shnenglu.com/Marcky/archive/2009/08/13/93110.html#Feedback0http://www.shnenglu.com/Marcky/comments/commentRss/93110.htmlhttp://www.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://www.shnenglu.com/Marcky/archive/2009/07/22/90839.htmlMarckyMarckyWed, 22 Jul 2009 08:33:00 GMThttp://www.shnenglu.com/Marcky/archive/2009/07/22/90839.htmlhttp://www.shnenglu.com/Marcky/comments/90839.htmlhttp://www.shnenglu.com/Marcky/archive/2009/07/22/90839.html#Feedback0http://www.shnenglu.com/Marcky/comments/commentRss/90839.htmlhttp://www.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>
              午夜国产精品影院在线观看| 亚洲乱码国产乱码精品精| 亚洲电影免费观看高清| 影音先锋国产精品| 欧美精品v日韩精品v韩国精品v | 亚洲黑丝在线| 日韩一级黄色大片| 欧美影院在线播放| 亚洲福利视频网| 亚洲二区三区四区| 夜夜精品视频一区二区| 午夜精品久久久久久久久久久| 欧美在线播放一区| 欧美成人视屏| 亚洲视频网站在线观看| 欧美在线三区| 欧美激情中文不卡| 国产精品爽黄69| 在线国产精品播放| 亚洲欧美另类久久久精品2019| 久久久国产精品一区二区三区| 能在线观看的日韩av| 亚洲精品一二| 久久久久久久网站| 国产精品xxxxx| 在线精品高清中文字幕| 亚洲在线日韩| 欧美激情一区二区三区在线| 亚洲在线免费视频| 欧美粗暴jizz性欧美20| 国产日韩欧美精品| 洋洋av久久久久久久一区| 午夜一区二区三区在线观看| 欧美粗暴jizz性欧美20| 亚洲欧美日韩天堂| 欧美日韩国产成人高清视频| 国产一区二区三区四区老人| 一区二区三区成人精品| 久久夜色精品国产亚洲aⅴ| 亚洲精品专区| 美女免费视频一区| 韩国三级在线一区| 欧美诱惑福利视频| 一区二区高清视频| 欧美日韩另类视频| 亚洲免费精彩视频| 亚洲高清网站| 久久久久国产精品一区二区| 国产女主播一区二区| 久久久999成人| 亚洲婷婷国产精品电影人久久 | 欧美电影免费观看网站| 在线观看不卡av| 欧美一区二区三区视频在线观看| 99re成人精品视频| 欧美激情在线播放| 日韩午夜av| 亚洲精品色图| 欧美插天视频在线播放| 亚洲国产精品黑人久久久| 久久一二三区| 久久精品人人爽| 精品999久久久| 久久在线视频| 狂野欧美激情性xxxx| 亚洲国产成人久久综合| 欧美成人久久| 欧美精品免费在线| 中文在线资源观看网站视频免费不卡| 亚洲三级电影在线观看| 欧美黄在线观看| 在线视频精品一区| 亚洲一区二区三区777| 国产精品一区二区你懂得| 欧美专区亚洲专区| 久久精品日产第一区二区三区| 国内精品模特av私拍在线观看| 久久夜色精品国产噜噜av| 久久综合导航| 亚洲国产影院| 99视频日韩| 国产精品欧美久久| 老鸭窝毛片一区二区三区| 久久亚洲欧美| 亚洲美女福利视频网站| 亚洲精品亚洲人成人网| 国产精品视频九色porn| 久久黄金**| 久久在线91| 一本色道久久综合亚洲精品婷婷| 亚洲免费高清| 国产精品区免费视频| 狼人社综合社区| 欧美高清免费| 久久久精品国产免大香伊| 久久久久久久久久久久久女国产乱 | 亚洲一区在线观看免费观看电影高清| 国产性天天综合网| 亚洲国产精品久久久久婷婷884| 国产精品av免费在线观看| 久久综合久久综合久久| 欧美日韩在线精品| 免费在线观看成人av| 99国产精品久久久| 欧美中文字幕视频| 亚洲美女在线国产| 欧美精品久久一区二区| 欧美电影在线观看| 亚洲日韩成人| 欧美三级在线播放| 亚洲视频欧美在线| 久久国产精品免费一区| 国产午夜精品一区理论片飘花 | 久久婷婷国产麻豆91天堂| 亚洲欧洲精品一区二区精品久久久 | 亚洲一区二区免费| 老司机成人在线视频| 欧美一区在线直播| 欧美日韩 国产精品| 欧美成人免费播放| 狠狠爱综合网| 亚洲欧美在线视频观看| 亚洲少妇中出一区| 欧美激情第4页| 欧美成在线观看| 在线免费观看日本一区| 欧美专区亚洲专区| 翔田千里一区二区| 国产精品女主播在线观看 | 免费毛片一区二区三区久久久| 国产精品剧情在线亚洲| 亚洲精品亚洲人成人网| 亚洲精一区二区三区| 欧美成人精品在线播放| 久久天堂精品| 在线欧美不卡| 蜜臀va亚洲va欧美va天堂| 久久综合电影| 亚洲高清一二三区| 免费不卡亚洲欧美| 亚洲福利精品| 亚洲片在线观看| 欧美成人免费小视频| 欧美激情在线播放| 亚洲精品资源美女情侣酒店| 欧美成人精品福利| 亚洲毛片一区| 香蕉乱码成人久久天堂爱免费| 国产日韩欧美中文| 久久美女性网| 亚洲精品国产精品国产自| 艳女tv在线观看国产一区| 欧美日韩中文在线| 亚洲一区免费视频| 久久se精品一区精品二区| 99精品视频免费全部在线| 久久亚洲视频| 亚洲精品小视频| 性欧美8khd高清极品| 国产精品久久久免费 | 欧美精品一区二区三区很污很色的 | 亚洲精品在线电影| 亚洲一二三区在线观看| 国产麻豆一精品一av一免费| 久久久xxx| 日韩午夜激情| 久久久亚洲高清| 99re8这里有精品热视频免费 | 国产精品国产三级国产| 亚洲欧美国产视频| 欧美成人免费在线视频| 一区二区三区四区国产精品| 国产欧美日韩精品丝袜高跟鞋 | 亚洲高清久久久| 亚洲欧美日本日韩| 在线精品视频在线观看高清| 欧美日韩亚洲成人| 久久久久久成人| 亚洲少妇自拍| 欧美激情乱人伦| 亚洲字幕一区二区| 91久久精品国产91久久| 国产精品素人视频| 欧美成人免费全部| 欧美影院在线播放| 一区二区精品国产| 亚洲大胆女人| 久久精品国产成人| 亚洲午夜在线观看视频在线| 亚洲国产mv| 一区二区亚洲精品| 国产欧美日韩一区二区三区| 欧美激情1区| 美脚丝袜一区二区三区在线观看 | 亚洲女同同性videoxma| 亚洲精品裸体| 在线日韩欧美视频| 韩国美女久久| 国产亚洲成人一区| 国产精品久久久久久久久婷婷|