RISC Machine Data Structure Word Alignment Problems?

Stan Lackey slackey at bbn.com
Tue Jan 23 06:09:52 AEST 1990


In article <LJ81OX3ggpc2 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>> I guess all the world's not a Vax any more, now it's a 68020.
>Worse, since non-word-aligned values do cost extra cycles to access, any
>68020 C compiler that didn't pad that structure is broken. Some "features"
>of CISC processors are just too expensive to use.

Just a quick summary of the last time we went around on this issue:

There are a number of interesting applications that build many
instances of small data structures, each containing varied data types.
It was said that logic simulators do this.  In a machine that forces
you to always have data aligned, this can result in lots of wasted
memory.  Not because the programmer is stupid, but because of the
nature of the application.

Now, if I have a 4MB workstation, and alignment restrictions increases
the need from under 4MB to over 4MB, there will be significant paging.
I'd rather spend two cycles to access a word sometimes, than have to
page over the Etherent.  So would the people with whom I share the
network.

------

Also: the comments on the 360 (aligned) vs 370 (unaligned):

Boy did I hear a different story.  The version I heard was that the
370 supported unaligned data, because the experience with the 360
showed it was incredibly painful to be without it.  Remember in those
days memory was VERY expensive.

:-) Stan



More information about the Comp.lang.c mailing list