In theory, yes, space is wasted. Although on a 32-bit processor, allocating 32 bits of data can mean faster access, since it is suitable for alignment. Thus, using a 32-bit variable only to store a value of 1 can be an optimization of speed compared to memory consumption.
, stdint.h
, , . uint8_t
, int
.
, - , , , uint_fast8_t
. , 255.