Keil Logo

Implicit Memory Types

If the memory type specifier is omitted in a variable declaration, the default or implicit memory type is automatically selected. Function arguments and automatic variables that cannot be located in registers are also stored in the default memory area.

For global variables, the HOLD directive lets you specify size limits and alternative default memory spaces. Refer to the HOLD directive.

The default memory type is determined by the LARGE, SMALL, TINY, XSMALL and XTINY compiler control directives. Refer to Memory Models for more information.

The following table lists the default memory areas used for each memory model.

Memory
Model
Parameter &
Automatic
Variables
Default
Global
Variables
Default
Constant
Variables
Default
Pointer
Definition
Default
Pointer
Size
TINY data data near near * 2 bytes
XTINY near near near near * 2 bytes
SMALL data data code far * 4 bytes
XSMALL near near code far * 4 bytes
LARGE xdata xdata code far * 4 bytes
  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.