<br><br><div class="gmail_quote">On Tue, Jan 4, 2011 at 11:28 PM, Mulyadi Santosa <span dir="ltr">&lt;<a href="mailto:mulyadi.santosa@gmail.com">mulyadi.santosa@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, Jan 5, 2011 at 00:40, mohit verma &lt;<a href="mailto:mohit89mlnc@gmail.com">mohit89mlnc@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; hi all,<br>
&gt; i have seen many places in  kernel where the variables specially the<br>
&gt; structures should be of  fixed size independent of the architecture. i went<br>
&gt; through the  definitions of them  but dint  get  clearly (or frankly  say<br>
&gt; ...dint get them even a bit) .<br>
<br>
</div>Your question isn&#39;t specific enough, so I&#39;ll just guess. Let&#39;s say<br>
&quot;int&quot;. In 32 bit, AFAIK it&#39;s  4 byte, but in 64 bit (like IA 64, not<br>
sure if it&#39;s x64) it&#39;s 8 byte. So, if you just say &quot;int&quot;, you will<br>
likely getting screwed up.<br>
<br>
By using types like u_int or something like that, you pretty much say<br>
&quot;I mean 4 byte kind of integer&quot; etc<br></blockquote><div> </div><div>Still there can be padding issues due to byte alignment, which may vary across architecture. Am not sure if that is controllable (probably some pragma to gcc?). Probably, OP is asking about it?</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
--<br>
regards,<br>
<br>
Mulyadi Santosa<br>
Freelance Linux trainer and consultant<br>
<br>
blog: <a href="http://the-hydra.blogspot.com" target="_blank">the-hydra.blogspot.com</a><br>
training: <a href="http://mulyaditraining.blogspot.com" target="_blank">mulyaditraining.blogspot.com</a><br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Rajesh S R<br><a href="http://rajeshsr.co.cc/blogs/">http://rajeshsr.co.cc/blogs/</a><br>