fixed memory bytes

Mulyadi Santosa mulyadi.santosa at
Tue Jan 4 12:58:39 EST 2011

On Wed, Jan 5, 2011 at 00:40, mohit verma <mohit89mlnc at> wrote:
> hi all,
> i have seen many places in  kernel where the variables specially the
> structures should be of  fixed size independent of the architecture. i went
> through the  definitions of them  but dint  get  clearly (or frankly  say
> ...dint get them even a bit) .

Your question isn't specific enough, so I'll just guess. Let's say
"int". In 32 bit, AFAIK it's  4 byte, but in 64 bit (like IA 64, not
sure if it's x64) it's 8 byte. So, if you just say "int", you will
likely getting screwed up.

By using types like u_int or something like that, you pretty much say
"I mean 4 byte kind of integer" etc


Mulyadi Santosa
Freelance Linux trainer and consultant


More information about the Kernelnewbies mailing list