<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[查看内存使用信息 ]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Mon, 23 Aug 2010 06:26:03 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	通过侦测脚本的内存使用情况，有利于代码的优化。PHP 提供了一个垃圾收集器和一个非常复杂的内存管理器。脚本执行时所使用的内存量，有升有跌。为了得到当前的内存使用情况，我们可以使用 memory_get_usage() 函数。如果需要获得任意时间点的最高内存使用量，则可以使用 memory_limit() 函数。<br/>否则出现： Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 493 bytes) in ***<br/>以下为引用的内容：<br/><br/><br/><div class="code">echo &quot;Initial: &quot;.memory_get_usage().&quot; bytes &#92;n&quot;;<br/>/* prints<br/>Initial: 361400 bytes<br/>*/<br/><br/>// let&#039;s use up some memory<br/>for ($i = 0; $i &lt; 100000; $i++) &#123;<br/> $array &#91;&#93;= md5($i);<br/>&#125;<br/><br/>// let&#039;s remove half of the array<br/>for ($i = 0; $i &lt; 100000; $i++) &#123;<br/> unset($array&#91;$i&#93;);<br/>&#125;<br/><br/>echo &quot;Final: &quot;.memory_get_usage().&quot; bytes &#92;n&quot;;<br/>/* prints<br/>Final: 885912 bytes<br/>*/<br/><br/>echo &quot;Peak: &quot;.memory_get_peak_usage().&quot; bytes &#92;n&quot;;<br/>/* prints<br/>Peak: 13687072 bytes<br/>*/</div>
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] 查看内存使用信息 ]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>