For example if I have an Enum with two cases, does it make take more memory than a boolean? Languages: Java, C++
In C/C++ an enum will be the same size as an int.
With gcc you can add attribute((packed)) to the enum definition to make it take the minimum footprint. If the largest value in the enum is < 256 this will be one byte, two bytes if the largest value is < 65536, etc.
typedef enum {
MY_ENUM0,
MY_ENUM1,
MY_ENUM2,
MY_ENUM3,
MY_ENUM4,
MY_ENUM5
} __attribute__((packed)) myEnum_e;