If I declare a data structure globally in a C++ application , does it consume stack memory or heap memory ?
For eg
struct AAA { .../.../. ../../.. }arr[59652323];
Since I wasn't satisfied with the answers, and hope that the sameer karjatkar wants to learn more than just a simple yes/no answer, here you go.
Typically a process has 5 different areas of memory allocated
If you really want to learn what is saved where then read and bookmark these:
COMPILER, ASSEMBLER, LINKER AND LOADER: A BRIEF STORY (look at Table w.5)
Anatomy of a Program in Memory
1.4m articles
1.4m replys
5 comments
57.0k users