|
|
1.1 ! root 1: ! 2: ! 3: alignment Definition alignment ! 4: ! 5: ! 6: ! 7: ! 8: Alignment refers to the fact that some microprocessors require ! 9: the address of a data entity to be aligned to a numeric boundary ! 10: in memory so that _a_d_d_r_e_s_s modulo _n_u_m_b_e_r equals zero. For ex- ! 11: ample, the M68000 and the PDP-11 require that an integer be ! 12: aligned along an even address, i.e., _a_d_d_r_e_s_s%22==00. ! 13: ! 14: Generally speaking, alignment is a problem only if you write ! 15: programs in assembly language. For C programs, COHERENT ensures ! 16: that data types are aligned properly under foreseeable con- ! 17: ditions. You should, however, beware of copying structures and ! 18: of casting a pointer to cchhaarr to a pointer to a ssttrruucctt, for these ! 19: could trigger alignment problems. ! 20: ! 21: Processors react differently to an alignment problem. On the VAX ! 22: or the i8086, it causes a program to run more slowly, whereas on ! 23: the M68000 it causes a bus error. ! 24: ! 25: ***** See Also ***** ! 26: ! 27: data types, definitions ! 28: ! 29: ! 30: ! 31: ! 32: ! 33: ! 34: ! 35: ! 36: ! 37: ! 38: ! 39: ! 40: ! 41: ! 42: ! 43: ! 44: ! 45: ! 46: ! 47: ! 48: ! 49: ! 50: ! 51: ! 52: ! 53: ! 54: ! 55: ! 56: ! 57: ! 58: ! 59: ! 60: ! 61: ! 62: ! 63: ! 64: COHERENT Lexicon Page 1 ! 65: ! 66:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.