4.5.9 How Big Can C Variables Be?

This question specifically relates to the size of individual C objects, such as arrays or structures. The total size of all variables is another matter.

To answer this question you need to know the memory space in which the variable is to be located. When using the -mconst-in-code option, objects qualified const will be located in program memory, other objects will be placed in data memory. Program memory object sizes are discussed in the following section of this user’s guide:

11.3.5 Size Limitations of Program Memory Variables [DD]

Objects in data memory are broadly grouped into “autos” and “non-autos.” These objects have size limitations. For more on auto and non-auto variables and the size limitations, see the following sections of this user’s guide:

11.2 Variables In Data Space Memory

11.2.3 Auto Variable Allocation and Access, "Auto Variable Size Limits"

11.2.2 Non-Auto Variable Allocation and Access - dsPIC33C/E/F and dsPIC30F Devices Only [DD], "Non-Auto Varible Size Limits"