Object Size Limits

An object with static storage duration cannot be made larger than the available device memory size, but there can be other restrictions as to how large each object can be.

When compiling for Enhanced Mid-range PIC devices, the size of an object is typically limited only by the total available data memory. Objects that will not fit into any one of the available data banks will be allocated across several banks and accessed using the device’s linear data memory feature. Linear memory access is typically slower than accessing the object directly.

When compiling for PIC18 devices, the size of an object is also typically limited only by the data memory available. The instruction set allows any object to span several data banks; however, the code to access such objects will typically be larger and slower.

On Baseline and other Mid-range devices, the object must entirely fit in one bank and so objects are limited in size to the largest of the available spaces in the data banks.