This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STATIC VARIABLE

Hi experts please don't mind as it is a novice question. Can anyone tell me where the static variable store is it-
1) Heap memory
2) RAM (STACK portion)
3) ROM (FLASH)

Parents
  • Heap memory is used for dynamic allocation - so they obviously don't go there. This is common to all compilers.

    The Stack is not used for static variables. This is common to all compilers.

    RAM, ROM, and Flash are meaningless to the 8051 instruction set - and, therefore, to the compiler.

    All the 8051 instruction set - and, therefore, to the compiler - deals with are the DATA, IDATA, XDATA, and CODE address spaces

    For the "common to all compilers" stuff, see your 'C' text book;

    For Keil C51 specific stuff, you need to study the Keil C51 Manuals; eg,

    See: http://www.keil.com/support/man/docs/c51/c51_le_memareas.htm

Reply
  • Heap memory is used for dynamic allocation - so they obviously don't go there. This is common to all compilers.

    The Stack is not used for static variables. This is common to all compilers.

    RAM, ROM, and Flash are meaningless to the 8051 instruction set - and, therefore, to the compiler.

    All the 8051 instruction set - and, therefore, to the compiler - deals with are the DATA, IDATA, XDATA, and CODE address spaces

    For the "common to all compilers" stuff, see your 'C' text book;

    For Keil C51 specific stuff, you need to study the Keil C51 Manuals; eg,

    See: http://www.keil.com/support/man/docs/c51/c51_le_memareas.htm

Children
No data