RTEMS Logo

RTEMS 4.7.2 On-Line Library


Code Tuning Parameters Partition Element Alignment

PREV UP NEXT Bookshelf RTEMS Porting Guide

9.4.3: Partition Element Alignment

The CPU_PARTITION_ALIGNMENT macro is set to indicate the byte alignment requirement for memory buffers allocated by the RTEMS Partition Manager that is part of the Classic API. This alignment requirement may be stricter than that for the data types alignment specified by CPU_ALIGNMENT. It is common for the partition to follow the same alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the partition, then this should be set to CPU_ALIGNMENT. This macro is necessary to ensure that allocated memory is properly aligned for use by high level language routines.

The following example illustrates how the CPU_PARTITION_ALIGNMENT macro is set when the required alignment for elements from the RTEMS Partition Manager is the same as the basic CPU alignment requirements.

#define CPU_PARTITION_ALIGNMENT    CPU_ALIGNMENT

NOTE: This does not have to be a power of 2. It does have to be greater or equal to than CPU_ALIGNMENT.


PREV UP NEXT Bookshelf RTEMS Porting Guide

Copyright © 1988-2004 OAR Corporation