Propeller Manual

Table Of Contents
_FREE – Spin Language Reference
_FREE
Constant: Pre-defined, one-time settable constant for specifying the size of an application’s
free space.
CON
_FREE = Expression
Expression is an integer expression that indicates the number of longs to reserve for
free space.
Explanation
_FREE is a pre-defined, one-time settable optional constant that specifies the required free
memory space of an application. This value is added to
_STACK, if specified, to determine the
total amount of free/stack memory space to reserve for a Propeller Application. Use
_FREE if
an application requires a minimum amount of free memory in order to run properly. If the
resulting compiled application is too large to allow the specified free memory, an error
message will be displayed. For example:
CON
_FREE = 1000
The _FREE declaration in the above CON block indicates that the application needs to have at
least 1,000 longs of free memory left over after compilation. If the resulting compiled
application does not have that much room left over, an error message will indicate by how
much it was exceeded. This is a good way to prevent successful compiles of an application
that will fail to run properly due to lack of memory.
Note that only the top object file can set the value of
_FREE. Any child object’s _FREE
declarations will be ignored.
Page 110 · Propeller Manual v1.1