align - align address to data boundary


char *align (addr, size)

char *addr;

int size;


The align function aligns an address with the correct boundary for the data type being accessed. The address addr is rounded upward to an address sufficient to hold any element of size size. The size parameter should be set by using the intrinsic sizeof() function in the C compiler.

The align function matches the alignment required by the C compiler on your system. For example, on most 16 bit machines (like the Intel 286 family), align rounds the address up to the next double word address (next eight byte boundary) when size is greater than 1.

This function is used only by the C/Base RMS file system to calculate the addresses of each element in a field list.


This function is machine and compiler dependent and should be avoided if at all possible.