<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>《也谈内存对齐(续)》的评论</title>
	<atom:link href="http://tonybai.com/2006/06/14/also-talk-about-memory-alignment-cont/feed/" rel="self" type="application/rss+xml" />
	<link>https://tonybai.com/2006/06/14/also-talk-about-memory-alignment-cont/</link>
	<description>一个程序员的心路历程</description>
	<lastBuildDate>Wed, 25 Mar 2026 09:21:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>作者：十年草木</title>
		<link>https://tonybai.com/2006/06/14/also-talk-about-memory-alignment-cont/#comment-110</link>
		<dc:creator>十年草木</dc:creator>
		<pubDate>Sun, 29 Nov 2009 21:17:33 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/2006/06/14/%e4%b9%9f%e8%b0%88%e5%86%85%e5%ad%98%e5%af%b9%e9%bd%90%e7%bb%ad/#comment-110</guid>
		<description>噢，对，嘿嘿
还有一个问题，在align_cpi_type函数定义中，域对齐实现过程：
tab[i].offset = rv;
cur += (atom_sz * (tab[i].nitems));
当前成员的起始地址找着了，cur位置是不是也应该移动一下再加当前成员的宽度。
也就是：
cur = tab[i].offset = rv;
是否应该是这样。。。

呵呵，真不好意思，感觉在挑毛病一样，真的觉得你这个程序想法很好，一起完善一下。</description>
		<content:encoded><![CDATA[<p>噢，对，嘿嘿<br />
还有一个问题，在align_cpi_type函数定义中，域对齐实现过程：<br />
tab[i].offset = rv;<br />
cur += (atom_sz * (tab[i].nitems));<br />
当前成员的起始地址找着了，cur位置是不是也应该移动一下再加当前成员的宽度。<br />
也就是：<br />
cur = tab[i].offset = rv;<br />
是否应该是这样。。。</p>
<p>呵呵，真不好意思，感觉在挑毛病一样，真的觉得你这个程序想法很好，一起完善一下。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：十年草木</title>
		<link>https://tonybai.com/2006/06/14/also-talk-about-memory-alignment-cont/#comment-111</link>
		<dc:creator>十年草木</dc:creator>
		<pubDate>Sun, 29 Nov 2009 13:57:48 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/2006/06/14/%e4%b9%9f%e8%b0%88%e5%86%85%e5%ad%98%e5%af%b9%e9%bd%90%e7%bb%ad/#comment-111</guid>
		<description>int x_atom_type_size[4] = {
        -1,
        sizeof(char), /*  和表中的类型不对应？*/
        sizeof(char),
        sizeof(int)
};</description>
		<content:encoded><![CDATA[<p>int x_atom_type_size[4] = {<br />
        -1,<br />
        sizeof(char), /*  和表中的类型不对应？*/<br />
        sizeof(char),<br />
        sizeof(int)<br />
};</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：十年草木</title>
		<link>https://tonybai.com/2006/06/14/also-talk-about-memory-alignment-cont/#comment-112</link>
		<dc:creator>十年草木</dc:creator>
		<pubDate>Sun, 29 Nov 2009 03:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/2006/06/14/%e4%b9%9f%e8%b0%88%e5%86%85%e5%ad%98%e5%af%b9%e9%bd%90%e7%bb%ad/#comment-112</guid>
		<description>函数align_cpi_type定义里面: 判断对齐模数和类型宽度选择一句modules应该是force_align_mod吧，即if (atom_sz &lt; modules)。
另外: int x_atom_type_size[4]第一个sizeof(char)，觉得会和文件中数据会对偏。
找2的幂边界那段，很赞。。。
学习，关注中。。。O(∩_∩)O</description>
		<content:encoded><![CDATA[<p>函数align_cpi_type定义里面: 判断对齐模数和类型宽度选择一句modules应该是force_align_mod吧，即if (atom_sz &lt; modules)。<br />
另外: int x_atom_type_size[4]第一个sizeof(char)，觉得会和文件中数据会对偏。<br />
找2的幂边界那段，很赞。。。<br />
学习，关注中。。。O(∩_∩)O</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Water</title>
		<link>https://tonybai.com/2006/06/14/also-talk-about-memory-alignment-cont/#comment-113</link>
		<dc:creator>Water</dc:creator>
		<pubDate>Fri, 02 May 2008 11:01:50 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/2006/06/14/%e4%b9%9f%e8%b0%88%e5%86%85%e5%ad%98%e5%af%b9%e9%bd%90%e7%bb%ad/#comment-113</guid>
		<description>非常感谢，明白了许多东西</description>
		<content:encoded><![CDATA[<p>非常感谢，明白了许多东西</p>
]]></content:encoded>
	</item>
</channel>
</rss>
