This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

"automatics require more than 16384 bytes" - What does that mean?

C166+AR166, MCBXC167-Net Board with XC167 Controller.

The Compiler list the following error:
"FIELD.C(89): error C176: 'test': automatics require more than 16384 bytes"
What does that mean? How can i solve this problem?

Thanks in advance!!!

Here is the corresponding function:

void test(void)
{
unsigned char field[288][502];
unsigned char *p_field;
p_field = &field[0][0];

}

Parents
  • The auto variable 'field' requires 144576 bytes! For something that big, it's best to allocate it as a static duration data object or as a dynamically allocated data object using malloc/free. Dynamic allocation, ill-advised as it may be, would behave more like an auto variable as far as the data object's lifetime is concerned.

Reply
  • The auto variable 'field' requires 144576 bytes! For something that big, it's best to allocate it as a static duration data object or as a dynamically allocated data object using malloc/free. Dynamic allocation, ill-advised as it may be, would behave more like an auto variable as far as the data object's lifetime is concerned.

Children
No data