|
Why does my application require different amounts of memory to store data when it is compiled for different targets?
|
| |
The IAR, GCC and Visual C compilers may store enumerated types in different quantities of memory. This can lead to applications requiring different amounts of memory to store data depending upon the compiler used. For example, consider this type definition taken from the smartcard driver: typedef enum { DRVSCT_ISO_COMPLIANT, DRVSCT_EMV_COMPLIANT } DRVSCT_COMPLIANCE; type_size = sizeof(DRVSCT_ISO_COMPLIANT); When the GCC or Visual C compilers are used, the value in type_size will be 4. When the IAR compiler is used, the value will be 1.
|
| |
|