Skip to main content
Tweeted twitter.com/#!/StackElectronix/status/214712800243761152
deleted 29 characters in body; edited title
Source Link
clabacchio
  • 13.7k
  • 4
  • 46
  • 80

Where are static variables are stored?

Simple Question. SupposeSuppose I am using a 8051. I compiled a code which has a static variable. Where that Static Variable will be stored? In RAM? In Stack? On Heap?? In flash? Where?

Also, Correct me Ifif I am wrong: CONST are stored in ROM. And Globalglobal variables are stored in Flash.(What if I don't have Flash?)

I am expecting answers with respect to Embedded Programming. It's not like in Code Segment or in .bss, but exact where on my board?

Thanks!

Where are static variables are stored?

Simple Question. Suppose I am using a 8051. I compiled a code which has a static variable. Where that Static Variable will be stored? In RAM? In Stack? On Heap?? In flash? Where?

Also, Correct me If I am wrong: CONST are stored in ROM. And Global variables are stored in Flash.(What if I don't have Flash?)

I am expecting answers with respect to Embedded Programming. It's not like in Code Segment or in .bss, but exact where on my board?

Thanks!

Where are static variables stored?

Suppose I am using a 8051. I compiled a code which has a static variable. Where that Static Variable will be stored? In RAM? In Stack? On Heap?? In flash? Where?

Also, Correct me if I am wrong: CONST are stored in ROM. And global variables are stored in Flash.(What if I don't have Flash?)

I am expecting answers with respect to Embedded Programming. It's not like in Code Segment or in .bss, but exact where on my board?

Source Link
Swanand
  • 3.3k
  • 6
  • 31
  • 46

Where are static variables are stored?

Simple Question. Suppose I am using a 8051. I compiled a code which has a static variable. Where that Static Variable will be stored? In RAM? In Stack? On Heap?? In flash? Where?

Also, Correct me If I am wrong: CONST are stored in ROM. And Global variables are stored in Flash.(What if I don't have Flash?)

I am expecting answers with respect to Embedded Programming. It's not like in Code Segment or in .bss, but exact where on my board?

Thanks!