Memory Models
The memory model determines the default memory type to use for function arguments, automatic variables, and declarations that include no explicit memory type. The C51 Compiler provides three memory models:
The following table lists the default memory areas used for each memory model.
You may specify the memory model on the compiler command line using the SMALL, COMPACT, or LARGE directives or using #pragma in the source file. You may also specify the memory model on a function-by-function basis by adding the memory model to the function declaration.
Note
- Except in very special select applications, the SMALL memory model generates the fastest, most efficient code.
You may override the default memory type imposed by the memory model by explicitly declaring a variable with a memory type specifier.
Related Knowledgebase Articles