[LCP]stdio.h reference
ianezz at sodalia.it
ianezz at sodalia.it
Tue Jan 8 18:57:20 UTC 2002
Il gatto di Priya, camminando sulla tastiera, ha scritto:
> This is more of a conceptual question.
> We know that multibyte data must be aligned on a
> natural boundary.That is four byte dta on a four byte
> boundary and two byte data on two byte boundary and so
> forth.But what is the reason behind this.CAn anyone
> please explain.What will be the problem if the data is
> not aligned???
The explanation I always heard was that the hardware is designed so
you have to use aligned addresses anyway.
So, in order to get/store a piece of data at a unaligned address, the
hardware has to perform some additional masking and shifting,
resulting in slower access times.
BTW, what I see here seems to confirm that:
http://www.memorymanagement.org/glossary/a.html#alignment
--
UNIX diapers by Pannolini USPTO 2039887 http://www.uspto.gov
Matteo Ianeselli ianezz AT sodalia.it (+39) 0461 316452
Visita il LinuxTrent: http://www.linuxtrent.it
More information about the linuxCprogramming
mailing list