Consider I have the following structure:
struct BigStruct {
char data1[999];
char data2[999];
...
char dataN[999];
}
and somewhere in the code I have a non-static variable of the type with initialization:
struct BigStruct foo =
{
.data1 = {0},
.data2 = {0},
...
.dataN = {0},
}
Looks like here will be an attempt to allocate several KB of memory on the stack. Am I right?
Is it ok, or it's a kind of bad practice?