Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

F2 MC-16LX Using the Pack-Un Pack function

F2 MC-16LX Using the Pack-Un Pack function

Anonymous
Not applicable

Version: **

Answer:

If the-pack option is specified before compiling a C source program, structure areas are packed without occurring empty areas.

Therefore it is possible to increase Memory efficiency.

Example:

struct a {
           char a_char;
           int a_int;
} struct_data;

1.png

But the boundary alignment of 2 byte structure is assigned to the odd address. Therefore read access time of the odd address is later than it of structure member assigned to even address. Pay attention to the above details.

0 Likes
195 Views
Contributors