Memory Models

The memory model determines the default memory type to be used for function arguments, automatic variables, and declarations with no explicit memory type specifier. You specify the memory model in the C51 options window in the project window using the SMALL, COMPACT, and LARGE control directives. Refer to the “Control Directives” section in the “Compiling with C51” chapter for more information about these directives.

NOTE
Except in very special selected applications, you should always use the default SMALL memory model. It will generate the fastest most efficient code.

By explicitly declaring a variable with a memory type specifier, you may override the default memory type imposed by the memory model . Refer to “C51 Memory Types” later in this section for more information.

 Small Model

 Compact Model

 Large Model