I am working on an embedded system, so memory is valuable to me.
One of the problems that repeated itself is that I ran out of free space while trying to compile a program for it. This is usually fixed by limiting the number of typedef, etc., which can take up a lot of space.
There is a macro generator that I use to create a file with lots of #define. Some of them are simple values, others are boundary checks.
t
#define SIGNAL1 (float)0.03f
#define SIGNAL1_ISVALID(value) ((value >= 0.0f) && (value <= 10.0f))
Now I do not use all these definitions. I use some, but not most. I was told that in fact they do not occupy any memory if they are not used, but I was not sure about it. I hope that by cutting out the unused ones, I can free up additional memory (but again I was told that this is pointless).
Unused #define takes up any memory space?
source
share