[Info-vax] nice for VMS

Richard B. Gilbert rgilbert88 at comcast.net
Mon Apr 13 08:09:44 EDT 2009


P. Sture wrote:
> In article <grup9q$efj$03$1 at news.t-online.com>,
>  Michael Kraemer <M.Kraemer at gsi.de> wrote:
> 
>> Arne Vajhøj schrieb:
>>
>>> It happens - struct(ure)s that are written or read to or
>>> from file/socket and have to be packed.
>>>
>>> Obviously not very funny when the code later has to be ported
>>> to Solaris/SPARC.
>>>
>> In this case it might be better to align the structure members
>> manually on 4/8 byte boundaries by inserting appropriate
>> padding members. Wastes space, but reduces headaches.
> 
> Going back to VAX only days here, but I once had to interface with 
> British Telecom systems using X26, and it was in their message frame 
> specification that the integer fields were big-endian.
> 
> I cannot remember whether they were aligned or not, but it was not under 
> our control. My point is that there are bound to be interface systems 
> out there which don't necessarily have integers aligned, dating from 
> times when non-alignment didn't carry such an overhead.
> 

I learned about alignment in the early 1970s with the IBM 360/91.  It 
had sixteen banks of 16MB of magnetic core.  It helped immensely to 
align things and it also mattered in what order you accessed array 
elements.  Memory was "interleaved" and if you stepped through an array 
at intervals of 16 bytes, you were banging on the same memory bank with 
each access!  It made a significant difference in speed.



More information about the Info-vax mailing list