Hello ,
I always had the feeling that is better to have char arrays with the
size equal to a power of two.
For example:
char a_str[128]; // feels ok
char b_str[100]; //feels not ok.
Is that true , and if is true then what is the reason behind this? ( I
suppose that is something related to memory alignment but it's not
very clear in my mind ).
A detailed explanation would be very useful.
Thx,
Daniel.
I always had the feeling that is better to have char arrays with the
size equal to a power of two.
For example:
char a_str[128]; // feels ok
char b_str[100]; //feels not ok.
Is that true , and if is true then what is the reason behind this? ( I
suppose that is something related to memory alignment but it's not
very clear in my mind ).
A detailed explanation would be very useful.
Thx,
Daniel.
Comment