Keil Logo

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 C251 Compiler provides these memory models:

You may specify the memory model on the compiler command line using the TINY, SMALL, 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 from a few particular applications, the TINY 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.

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.