Skip to content
RED SAGSkills
easy5 pts · first answer countsembedded-cmemory-layout

Shrinking a struct by reordering

On a 32-bit ARM target, how many bytes does reordering these members largest-first save in each struct?

struct a { uint8_t x; uint32_t y; uint8_t z; };   /* original */
struct b { uint32_t y; uint8_t x; uint8_t z; };   /* reordered */
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions