Keil Logo

Memory Models

The memory model determines the default memory type to use for variables and functions. The C166 Compiler provides seven memory models as shown in the following table:

Directive Memory Model Variable
Addresses
Function
Addresses
TINY Tiny Model near near
Up to 64K Code Size
SMALL Small Model near near
Up to 64K Code Size
MEDIUM Medium Model near far
Unlimited Code Size
COMPACT Compact Model far near
Up to 64K Code Size
LARGE Large Model far far
Unlimited Code Size
HCOMPACT HCompact Model huge near
Up to 64K Code Size
HLARGE HLarge Model huge far
Unlimited Code Size
XLARGE XLarge Model xhuge far
Unlimited Code Size

Note

  • You may override the default memory type imposed by the memory model by explicitly declaring a variable or function 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.