<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>佳音的博客</title>
	<atom:link href="http://blog.00rz.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.00rz.com</link>
	<description>方乃做人之本，圆乃处世之道</description>
	<lastBuildDate>Wed, 07 Dec 2011 11:31:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>获取正在运行 进程的函数栈</title>
		<link>http://blog.00rz.com/2011/12/%e8%8e%b7%e5%8f%96%e6%ad%a3%e5%9c%a8%e8%bf%90%e8%a1%8c-%e8%bf%9b%e7%a8%8b%e7%9a%84%e5%87%bd%e6%95%b0%e6%a0%88.html</link>
		<comments>http://blog.00rz.com/2011/12/%e8%8e%b7%e5%8f%96%e6%ad%a3%e5%9c%a8%e8%bf%90%e8%a1%8c-%e8%bf%9b%e7%a8%8b%e7%9a%84%e5%87%bd%e6%95%b0%e6%a0%88.html#comments</comments>
		<pubDate>Wed, 07 Dec 2011 11:31:47 +0000</pubDate>
		<dc:creator>佳音</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.00rz.com/?p=335</guid>
		<description><![CDATA[1、gdb -p pid 当前进程会挂起 2、pstack -p pid or gstack -p pid 3、gcore [-o filename] pid 然后用gdb调试。]]></description>
			<content:encoded><![CDATA[<p>1、gdb -p pid 当前进程会挂起<br />
2、pstack -p pid  or  gstack -p pid<br />
3、gcore [-o filename] pid  然后用gdb调试。</p>
<p><map name='google_ad_map_335_4664d84c6fd17adb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/335?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_335_4664d84c6fd17adb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=335&amp;url= http%3A%2F%2Fblog.00rz.com%2F2011%2F12%2F%25e8%258e%25b7%25e5%258f%2596%25e6%25ad%25a3%25e5%259c%25a8%25e8%25bf%2590%25e8%25a1%258c-%25e8%25bf%259b%25e7%25a8%258b%25e7%259a%2584%25e5%2587%25bd%25e6%2595%25b0%25e6%25a0%2588.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.00rz.com/2011/12/%e8%8e%b7%e5%8f%96%e6%ad%a3%e5%9c%a8%e8%bf%90%e8%a1%8c-%e8%bf%9b%e7%a8%8b%e7%9a%84%e5%87%bd%e6%95%b0%e6%a0%88.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gcc  march参数 cpu相关</title>
		<link>http://blog.00rz.com/2011/12/cpu-%e7%bc%96%e8%af%91%e5%8f%82%e6%95%b0.html</link>
		<comments>http://blog.00rz.com/2011/12/cpu-%e7%bc%96%e8%af%91%e5%8f%82%e6%95%b0.html#comments</comments>
		<pubDate>Wed, 07 Dec 2011 11:11:19 +0000</pubDate>
		<dc:creator>佳音</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.00rz.com/?p=324</guid>
		<description><![CDATA[&#160; CPU&#160; &#160; &#160;Family&#160; Rec. system gcc&#160;Rec. ports compiler Intel Atom D525&#160;atom&#160; &#160; CPUTYPE=core2 &#40;*&#41;&#160; &#160; &#160; &#160;gcc45 -march=atom Intel Xeon 3065&#160;core2&#160; &#160;CPUTYPE=core2 &#40;*&#41;&#160; &#160; &#160; &#160;gcc45 Intel Xeon E5310&#160; &#160; &#160; &#160; core2&#160; &#160;CPUTYPE=core2 &#40;*&#41;&#160; &#160; &#160; &#160;gcc45 -march=core2 Intel Xeon E5405&#160; &#160; &#160; &#160; core2&#160; &#160;no CPUTYPE&#160; &#160; &#160; gcc45 -march=core2 Intel Core [...]]]></description>
			<content:encoded><![CDATA[<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">CPU&nbsp; &nbsp; &nbsp;Family&nbsp; Rec. <span class="me1">system</span> gcc&nbsp;Rec. <span class="me1">ports</span> compiler</div>
</li>
<li class="li1">
<div class="de1">Intel Atom D525&nbsp;atom&nbsp; &nbsp; CPUTYPE=core2 <span class="br0">&#40;</span>*<span class="br0">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp;gcc45 -march=atom</div>
</li>
<li class="li1">
<div class="de1">Intel Xeon <span class="nu0">3065</span>&nbsp;core2&nbsp; &nbsp;CPUTYPE=core2 <span class="br0">&#40;</span>*<span class="br0">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp;gcc45</div>
</li>
<li class="li2">
<div class="de2">Intel Xeon E5310&nbsp; &nbsp; &nbsp; &nbsp; core2&nbsp; &nbsp;CPUTYPE=core2 <span class="br0">&#40;</span>*<span class="br0">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp;gcc45 -march=core2</div>
</li>
<li class="li1">
<div class="de1">Intel Xeon E5405&nbsp; &nbsp; &nbsp; &nbsp; core2&nbsp; &nbsp;no CPUTYPE&nbsp; &nbsp; &nbsp; gcc45 -march=core2</div>
</li>
<li class="li1">
<div class="de1">Intel Core i7<span class="nu0">-920</span>&nbsp; &nbsp; &nbsp; &nbsp;nehalem&nbsp;CPUTYPE=nocona&nbsp; gcc45 -march=nocona</div>
</li>
<li class="li1">
<div class="de1">Intel Xeon X3450&nbsp; &nbsp; &nbsp; &nbsp; nehalem&nbsp;CPUTYPE=nocona&nbsp; gcc45 -march=nocona</div>
</li>
<li class="li1">
<div class="de1">Intel Xeon E5620&nbsp; &nbsp; &nbsp; &nbsp; nehalem&nbsp;CPUTYPE=nocona&nbsp; gcc45 -march=nocona</div>
</li>
<li class="li2">
<div class="de2">AMD Opteron <span class="nu0">6128</span>&nbsp; &nbsp; &nbsp; &nbsp; barcelona&nbsp; &nbsp; &nbsp; &nbsp;CPUTYPE=opteron-ssse3&nbsp; &nbsp;gcc45 -march=barcelona</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>http://blog.vx.sk/archives/25-FreeBSD-Compiler-Benchmark-gcc-base-vs-gcc-ports-vs-clang.html</p>
<p><map name='google_ad_map_324_4664d84c6fd17adb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/324?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_324_4664d84c6fd17adb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=324&amp;url= http%3A%2F%2Fblog.00rz.com%2F2011%2F12%2Fcpu-%25e7%25bc%2596%25e8%25af%2591%25e5%258f%2582%25e6%2595%25b0.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.00rz.com/2011/12/cpu-%e7%bc%96%e8%af%91%e5%8f%82%e6%95%b0.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关于curl multi的bug</title>
		<link>http://blog.00rz.com/2011/07/%e5%85%b3%e4%ba%8ecurl-multi%e7%9a%84bug.html</link>
		<comments>http://blog.00rz.com/2011/07/%e5%85%b3%e4%ba%8ecurl-multi%e7%9a%84bug.html#comments</comments>
		<pubDate>Sun, 31 Jul 2011 01:22:26 +0000</pubDate>
		<dc:creator>佳音</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.00rz.com/?p=320</guid>
		<description><![CDATA[http://curl.haxx.se/mail/lib-2010-06/0030.html http://sourceforge.net/tracker/index.php?func=detail&#038;aid=2501457&#038;group_id=976&#038;atid=100976]]></description>
			<content:encoded><![CDATA[<p>http://curl.haxx.se/mail/lib-2010-06/0030.html</p>
<p>http://sourceforge.net/tracker/index.php?func=detail&#038;aid=2501457&#038;group_id=976&#038;atid=100976</p>
<p><map name='google_ad_map_320_4664d84c6fd17adb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/320?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_320_4664d84c6fd17adb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=320&amp;url= http%3A%2F%2Fblog.00rz.com%2F2011%2F07%2F%25e5%2585%25b3%25e4%25ba%258ecurl-multi%25e7%259a%2584bug.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.00rz.com/2011/07/%e5%85%b3%e4%ba%8ecurl-multi%e7%9a%84bug.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The TIME-WAIT state in TCP and Its Effect on Busy Servers</title>
		<link>http://blog.00rz.com/2011/02/the-time-wait-state-in-tcp-and-its-effect-on-busy-servers.html</link>
		<comments>http://blog.00rz.com/2011/02/the-time-wait-state-in-tcp-and-its-effect-on-busy-servers.html#comments</comments>
		<pubDate>Tue, 15 Feb 2011 10:20:34 +0000</pubDate>
		<dc:creator>佳音</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.00rz.com/?p=311</guid>
		<description><![CDATA[The TIME-WAIT state in TCP and Its Effect on Busy Servers from  http://www.isi.edu/touch/pubs/infocomm99/infocomm99-web/]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.00rz.com/wp-content/uploads/2011/02/10.1.1.116.9808.pdf">The TIME-WAIT state in TCP and Its Effect on Busy Servers</a> from  <a href="http://www.isi.edu/touch/pubs/infocomm99/infocomm99-web/">http://www.isi.edu/touch/pubs/infocomm99/infocomm99-web/</a></p>
<p><map name='google_ad_map_311_4664d84c6fd17adb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/311?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_311_4664d84c6fd17adb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=311&amp;url= http%3A%2F%2Fblog.00rz.com%2F2011%2F02%2Fthe-time-wait-state-in-tcp-and-its-effect-on-busy-servers.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.00rz.com/2011/02/the-time-wait-state-in-tcp-and-its-effect-on-busy-servers.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>自增运算php &amp; c</title>
		<link>http://blog.00rz.com/2010/10/%e8%87%aa%e5%a2%9e%e8%bf%90%e7%ae%97php-c.html</link>
		<comments>http://blog.00rz.com/2010/10/%e8%87%aa%e5%a2%9e%e8%bf%90%e7%ae%97php-c.html#comments</comments>
		<pubDate>Fri, 15 Oct 2010 08:18:54 +0000</pubDate>
		<dc:creator>佳音</dc:creator>
				<category><![CDATA[c语言学习]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.00rz.com/?p=265</guid>
		<description><![CDATA[以前面试的时候老有人问  ++i 和 i++ 的问题， 每每心里都在暗暗想&#8230;, 1、这俩东西功能不一样。 2、 写代码的时候多放些注意力在别的地方比在这个地方纠结强。 我总认为， 可读性和扩展性好的代码  比 一堆 又烂又快的代码好。 3、不免俗的研究了一下。 对于C #include &#34;stdio.h&#34; &#160; int main&#40;int argc, char *argv&#91;&#93;&#41; &#123; &#160; &#160; int i = 0; &#160; &#160; &#160; int a = 0; &#160; &#160; int b = 0; &#160; &#160; &#160; a = i++; &#160; &#160; b= &#160;++i; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>以前面试的时候老有人问  ++i 和 i++ 的问题， 每每心里都在暗暗想&#8230;,<br />
1、这俩东西功能不一样。</p>
<p>2、 写代码的时候多放些注意力在别的地方比在这个地方纠结强。<br />
我总认为， 可读性和扩展性好的代码  比 一堆 又烂又快的代码好。</p>
<p>3、不免俗的研究了一下。</p>
<p>对于C</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="co2">#include &quot;stdio.h&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">int</span> main<span class="br0">&#40;</span><span class="kw4">int</span> argc, <span class="kw4">char</span> *argv<span class="br0">&#91;</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw4">int</span> i = <span class="nu0">0</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw4">int</span> a = <span class="nu0">0</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw4">int</span> b = <span class="nu0">0</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; a = i++;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; b= &nbsp;++i;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; i++;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; ++i;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span class="kw3">printf</span></a><span class="br0">&#40;</span><span class="st0">&quot;%d&quot;</span>,a<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span class="kw3">printf</span></a><span class="br0">&#40;</span><span class="st0">&quot;%d&quot;</span>,b<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>汇编后</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .file&nbsp; &nbsp;&quot;test.c&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .section&nbsp; &nbsp; &nbsp; &nbsp; .rodata
</div>
</li>
<li class="li1">
<div class="de1">.LC0:
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .string&nbsp;&quot;%d&quot;
</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; .text
</div>
</li>
<li class="li1">
<div class="de1">.globl main
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .type&nbsp; &nbsp;main, @function
</div>
</li>
<li class="li1">
<div class="de1">main:
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; pushl&nbsp; &nbsp;%ebp
</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; %esp, %ebp
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; andl&nbsp; &nbsp; $-16, %esp
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; subl&nbsp; &nbsp; $32, %esp
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; $0, 28(%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; $0, 24(%esp)
</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; $0, 20(%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; 28(%esp), %eax
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; %eax, 24(%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; addl&nbsp; &nbsp; $1, 28(%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; addl&nbsp; &nbsp; $1, 28(%esp)
</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; 28(%esp), %eax
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; %eax, 20(%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; addl&nbsp; &nbsp; $1, 28(%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; addl&nbsp; &nbsp; $1, 28(%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; $.LC0, %eax
</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; 24(%esp), %edx
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; %edx, 4(%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; %eax, (%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; call&nbsp; &nbsp; printf
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; $.LC0, %eax
</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; 20(%esp), %edx
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; %edx, 4(%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; movl&nbsp; &nbsp; %eax, (%esp)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; call&nbsp; &nbsp; printf
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; leave
</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; ret
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .size&nbsp; &nbsp;main, .-main
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .ident&nbsp; &quot;GCC: (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .section&nbsp; &nbsp; &nbsp; &nbsp; .note.GNU-stack,&quot;&quot;,@progbits</div>
</li>
</ol>
</div>
<p>可以看出没有赋值操作的 自增运算 不管是 ++i 还是i++ 都会被会变成一条相同的汇编（addl	$1, 28(%esp)）<br />
如果有赋值操作的时候 汇编的条数是一样的 只是 几条语句的顺序不一样<br />
所以C中这两种格式区别仅在于生成的值, 所以在仅使用它们的副作用时, 二者 完全一样，</p>
<p>http://c-faq-chn.sourceforge.net/ccfaq/node46.htm</p>
<p>但是 C++同学的表现是不一样的有兴趣的同学google一下，</p>
<p>悲剧 刚才写的一段代码丢了<br />
简单说下php同学吧<br />
有兴趣的通许参阅一下php源码  大概在这个文件里zend_compile.c<br />
stackoverflow上有一些简单的说明:</p>
<p>http://stackoverflow.com/questions/1756015/whats-the-difference-between-i-and-i-in-php</p>
<p>原文有一段<br />
:For further clarification, post-incrementation in PHP has been documented as storing a temporary variable which attributes to this 10% overhead vs. pre-incrementation.</p>
<p>是说 post-incrementation i++ 比pre-incrementation ＋＋i 花费多10% 来存储一个临时变量。</p>
<p><map name='google_ad_map_265_4664d84c6fd17adb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/265?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_265_4664d84c6fd17adb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=265&amp;url= http%3A%2F%2Fblog.00rz.com%2F2010%2F10%2F%25e8%2587%25aa%25e5%25a2%259e%25e8%25bf%2590%25e7%25ae%2597php-c.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.00rz.com/2010/10/%e8%87%aa%e5%a2%9e%e8%bf%90%e7%ae%97php-c.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1/</title>
		<link>http://blog.00rz.com/2010/10/httpwww-metabrew-comarticlea-million-user-comet-application-with-mochiweb-part-1.html</link>
		<comments>http://blog.00rz.com/2010/10/httpwww-metabrew-comarticlea-million-user-comet-application-with-mochiweb-part-1.html#comments</comments>
		<pubDate>Wed, 06 Oct 2010 14:24:54 +0000</pubDate>
		<dc:creator>佳音</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.00rz.com/2010/10/httpwww-metabrew-comarticlea-million-user-comet-application-with-mochiweb-part-1.html</guid>
		<description><![CDATA[http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1/]]></description>
			<content:encoded><![CDATA[<p>http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1/</p>
<p><map name='google_ad_map_262_4664d84c6fd17adb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/262?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_262_4664d84c6fd17adb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=262&amp;url= http%3A%2F%2Fblog.00rz.com%2F2010%2F10%2Fhttpwww-metabrew-comarticlea-million-user-comet-application-with-mochiweb-part-1.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.00rz.com/2010/10/httpwww-metabrew-comarticlea-million-user-comet-application-with-mochiweb-part-1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php extension 声明类属性</title>
		<link>http://blog.00rz.com/2010/09/php-extension-delcare-class-array-property.html</link>
		<comments>http://blog.00rz.com/2010/09/php-extension-delcare-class-array-property.html#comments</comments>
		<pubDate>Wed, 22 Sep 2010 09:18:48 +0000</pubDate>
		<dc:creator>佳音</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.00rz.com/?p=256</guid>
		<description><![CDATA[在弄一个php扩展， 想把 扩展写成类的 形式， 于是在声明的时候 想给类加个array 属性 于是expect 代码是这样的 &#160; PHP_MINIT_FUNCTION&#40;concurrency&#41; &#123; &#160; &#160; &#160; &#160; zend_class_entry ce; &#160; &#160; &#160; &#160; INIT_CLASS_ENTRY&#40;ce, PHP_CONCURRENCY_CLASSNAME, concurrency_class_methods&#41;; &#160; &#160; &#160; &#160; concurrency_class_entry = zend_register_internal_class&#40;&#38;amp;ce TSRMLS_CC&#41;; &#160; &#160; &#160; &#160; &#160; zval *requests; &#160; &#160; &#160; &#160; &#160; MAKE_STD_ZVAL&#40;requests&#41;; &#160; &#160; &#160; &#160; &#160; array_init&#40;requests&#41;; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>在弄一个php扩展， 想把 扩展写成类的 形式， 于是在声明的时候 想给类加个array 属性<br />
于是expect 代码是这样的</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">PHP_MINIT_FUNCTION<span class="br0">&#40;</span>concurrency<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; zend_class_entry ce;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; INIT_CLASS_ENTRY<span class="br0">&#40;</span>ce, PHP_CONCURRENCY_CLASSNAME, concurrency_class_methods<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; concurrency_class_entry = zend_register_internal_class<span class="br0">&#40;</span>&amp;amp;ce TSRMLS_CC<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; zval *requests;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; MAKE_STD_ZVAL<span class="br0">&#40;</span>requests<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; array_init<span class="br0">&#40;</span>requests<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; zend_printf<span class="br0">&#40;</span><span class="st0">&quot;%d&quot;</span>, requests-&gt;type<span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; zend_declare_property<span class="br0">&#40;</span>concurrency_class_entry, <span class="st0">&quot;requests&quot;</span>, strlen<span class="br0">&#40;</span><span class="st0">&quot;requests&quot;</span><span class="br0">&#41;</span>, requests, ZEND_ACC_PUBLIC<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> SUCCESS;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>结果报错，<br />
PHP Fatal error:  Internal zval&#8217;s can&#8217;t be arrays, objects or resources in Unknown on line 0<br />
把requests->type 用zend_printf打出来发现 结果是4 是 ZEND定义的IS_ARRAY,<br />
继续翻代码<br />
发现在Zend/zend_API.c 里面zend_declare_property的原型 有这样的定义</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>ce-&gt;type &amp; ZEND_INTERNAL_CLASS<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">switch</span><span class="br0">&#40;</span>Z_TYPE_P<span class="br0">&#40;</span>property<span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">case</span> IS_ARRAY:</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">case</span> IS_CONSTANT_ARRAY:</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">case</span> IS_OBJECT:</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">case</span> IS_RESOURCE:</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zend_error<span class="br0">&#40;</span>E_CORE_ERROR, <span class="st0">&quot;Internal zval&#8217;s can&#8217;t be arrays, objects or resources&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">break</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">default</span>:</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">break</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>不知何意看<br />
staceflow 上也有人遇到这种问题</p>
<p>http://stackoverflow.com/posts/1105360/revisions</p>
<p>，没办法，<br />
于是就改成在构造函数里面 增加属性的声明<br />
just as follow</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">PHP_METHOD<span class="br0">&#40;</span>Concurrency, __construct<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; zval *pThis;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; pThis = getThis<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; zval *requests;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; MAKE_STD_ZVAL<span class="br0">&#40;</span>requests<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; array_init<span class="br0">&#40;</span>requests<span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; add_property_zval_ex<span class="br0">&#40;</span>pThis, <span class="st0">&quot;requests&quot;</span>, <span class="kw4">sizeof</span><span class="br0">&#40;</span><span class="st0">&quot;requests&quot;</span><span class="br0">&#41;</span>, requests<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>在这里记下！</p>
<p><map name='google_ad_map_256_4664d84c6fd17adb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/256?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_256_4664d84c6fd17adb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=256&amp;url= http%3A%2F%2Fblog.00rz.com%2F2010%2F09%2Fphp-extension-delcare-class-array-property.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.00rz.com/2010/09/php-extension-delcare-class-array-property.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关于 ubuntu 下 eclipse  代码编辑区域 在代码 补全 后不能编辑 的笔记</title>
		<link>http://blog.00rz.com/2010/08/%e5%85%b3%e4%ba%8e-ubuntu-%e4%b8%8b-eclipse-%e4%bb%a3%e7%a0%81%e7%bc%96%e8%be%91%e5%8c%ba%e5%9f%9f-%e5%9c%a8%e4%bb%a3%e7%a0%81-%e8%a1%a5%e5%85%a8-%e5%90%8e%e4%b8%8d%e8%83%bd%e7%bc%96%e8%be%91.html</link>
		<comments>http://blog.00rz.com/2010/08/%e5%85%b3%e4%ba%8e-ubuntu-%e4%b8%8b-eclipse-%e4%bb%a3%e7%a0%81%e7%bc%96%e8%be%91%e5%8c%ba%e5%9f%9f-%e5%9c%a8%e4%bb%a3%e7%a0%81-%e8%a1%a5%e5%85%a8-%e5%90%8e%e4%b8%8d%e8%83%bd%e7%bc%96%e8%be%91.html#comments</comments>
		<pubDate>Wed, 25 Aug 2010 04:25:24 +0000</pubDate>
		<dc:creator>佳音</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.00rz.com/?p=254</guid>
		<description><![CDATA[以前没有发现这个问题， 今天下了一个eclipse3.6 装了之后，发现编辑代码时，补全之后 编辑器貌似还在获得焦点， 但是不能type 字符，很奇怪， google 了一下，没有找到，解决方案， 这次baidu很出息，找到是scim问题， 据说还是一个老问题， 修改 /etc/X11/xinit/xinput.d/scim 将原来的 GTK_IM_MODULE=xim QT_IM_MODULE=xim 改成 GTK_IM_MODULE=scim QT_IM_MODULE=scim 之前在切换 terminal 的之后， 开始的时候键盘反应慢的问题也解决了。]]></description>
			<content:encoded><![CDATA[<p>以前没有发现这个问题， 今天下了一个eclipse3.6 装了之后，发现编辑代码时，补全之后 编辑器貌似还在获得焦点，<br />
但是不能type 字符，很奇怪，<br />
google 了一下，没有找到，解决方案，<br />
这次baidu很出息，找到是scim问题， 据说还是一个老问题， </p>
<p>修改<br />
/etc/X11/xinit/xinput.d/scim<br />
将原来的<br />
GTK_IM_MODULE=xim<br />
QT_IM_MODULE=xim<br />
改成<br />
GTK_IM_MODULE=scim<br />
QT_IM_MODULE=scim</p>
<p>之前在切换 terminal 的之后， 开始的时候键盘反应慢的问题也解决了。</p>
<p><map name='google_ad_map_254_4664d84c6fd17adb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/254?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_254_4664d84c6fd17adb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=254&amp;url= http%3A%2F%2Fblog.00rz.com%2F2010%2F08%2F%25e5%2585%25b3%25e4%25ba%258e-ubuntu-%25e4%25b8%258b-eclipse-%25e4%25bb%25a3%25e7%25a0%2581%25e7%25bc%2596%25e8%25be%2591%25e5%258c%25ba%25e5%259f%259f-%25e5%259c%25a8%25e4%25bb%25a3%25e7%25a0%2581-%25e8%25a1%25a5%25e5%2585%25a8-%25e5%2590%258e%25e4%25b8%258d%25e8%2583%25bd%25e7%25bc%2596%25e8%25be%2591.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.00rz.com/2010/08/%e5%85%b3%e4%ba%8e-ubuntu-%e4%b8%8b-eclipse-%e4%bb%a3%e7%a0%81%e7%bc%96%e8%be%91%e5%8c%ba%e5%9f%9f-%e5%9c%a8%e4%bb%a3%e7%a0%81-%e8%a1%a5%e5%85%a8-%e5%90%8e%e4%b8%8d%e8%83%bd%e7%bc%96%e8%be%91.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter 更新 for 2010-07-25</title>
		<link>http://blog.00rz.com/2010/07/twitter-%e6%9b%b4%e6%96%b0-for-2010-07-25-2.html</link>
		<comments>http://blog.00rz.com/2010/07/twitter-%e6%9b%b4%e6%96%b0-for-2010-07-25-2.html#comments</comments>
		<pubDate>Sun, 25 Jul 2010 08:20:00 +0000</pubDate>
		<dc:creator>佳音</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[twtteen]]></category>

		<guid isPermaLink="false">http://blog.00rz.com/2010/07/twitter-%e6%9b%b4%e6%96%b0-for-2010-07-25-2.html</guid>
		<description><![CDATA[firefox + foxyproxy + ssh 比vpn 好用多了 # Powered by Twitter Tools]]></description>
			<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
<li>firefox + foxyproxy + ssh 比vpn 好用多了 <a href="http://twitter.com/zhangjiayin/statuses/19300009185" class="aktt_tweet_time">#</a></li>
</ul>
<p class="aktt_credit">Powered by <a href="http://alexking.org/projects/wordpress">Twitter Tools</a></p>
<p><map name='google_ad_map_251_4664d84c6fd17adb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/251?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_251_4664d84c6fd17adb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=251&amp;url= http%3A%2F%2Fblog.00rz.com%2F2010%2F07%2Ftwitter-%25e6%259b%25b4%25e6%2596%25b0-for-2010-07-25-2.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.00rz.com/2010/07/twitter-%e6%9b%b4%e6%96%b0-for-2010-07-25-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter 更新 for 2010-07-25</title>
		<link>http://blog.00rz.com/2010/07/twitter-%e6%9b%b4%e6%96%b0-for-2010-07-25.html</link>
		<comments>http://blog.00rz.com/2010/07/twitter-%e6%9b%b4%e6%96%b0-for-2010-07-25.html#comments</comments>
		<pubDate>Sun, 25 Jul 2010 08:20:00 +0000</pubDate>
		<dc:creator>佳音</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[twtteen]]></category>

		<guid isPermaLink="false">http://blog.00rz.com/2010/07/twitter-%e6%9b%b4%e6%96%b0-for-2010-07-25.html</guid>
		<description><![CDATA[firefox + foxyproxy + ssh 比vpn 好用多了 # Powered by Twitter Tools]]></description>
			<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
<li>firefox + foxyproxy + ssh 比vpn 好用多了 <a href="http://twitter.com/zhangjiayin/statuses/19300009185" class="aktt_tweet_time">#</a></li>
</ul>
<p class="aktt_credit">Powered by <a href="http://alexking.org/projects/wordpress">Twitter Tools</a></p>
<p><map name='google_ad_map_250_4664d84c6fd17adb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/250?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_250_4664d84c6fd17adb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=250&amp;url= http%3A%2F%2Fblog.00rz.com%2F2010%2F07%2Ftwitter-%25e6%259b%25b4%25e6%2596%25b0-for-2010-07-25.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.00rz.com/2010/07/twitter-%e6%9b%b4%e6%96%b0-for-2010-07-25.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

