Compiler Error C0415
Important
In general, persistent variables should be used only when absolutely necessary.
Message: Out of persistent memory. Variable '<variable name>', <count> bytes (Largest contiguous memory gap <size>). Editing persistent variable lists may produce fragmented memory. Perform "Declarations, Reorder List and Clear Gaps" command to compact persistent variable lists.
Possible error cause: There is not enough memory available for the compiler on the development computer.
The persistent memory is intended for variables that should retain their values after the download. This only works well when the types of the variables do not change. Therefore, as few variables as possible with complex data types (for example, structures or arrays of structures) should be mapped in the persistent area. When such variables change, large gaps can occur in the persistent data, leading to this error.
Error correction: The following action can fix the error. Run the Reorder List and Clear Gaps command to reorder the persistent variables and reallocate the memory. The persistent variables should then be reinitialized. If you want to avoid doing this, then you can run the Save Current Values to Recipe command for the current values. After a new download, you can run the Restore Values from Recipe command to restore the values.
For more information, see: Command Reorder List and Clear Gaps, Command Restore Values from Recipe