How to determine allignment

From: Lars Bro <lbr_at_dksin.dk>
Date: Thu, 31 Dec 1998 09:39:10 +0100

Hi, folks.


I have been asked how to correctly determine the allignment
boundary.

My own suggestion is that the type ´int´ in C is used as the
´most appropriate´ data size for the processor so if

address % sizeof(int) == 0

anything can be put into that address without problems.

Is this all wrong ? Is there a better way or what ?


-- 
   Lars Bro                                        lbr_at_dksin.dk
   ABB Daimler-Benz Transportation Signal A/S      +45 36 39 01 77
Received on Tue Jan 26 1999 - 09:45:47 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT