How is the memory layout of a C/C++ program?

后端 未结 6 2050
感动是毒
感动是毒 2021-01-31 22:00

I know that there are sections like Stack, Heap, Code and Data. Stack/Heap do they use the same section of memory as they can grow independently? What is this code section? When

6条回答
  •  深忆病人
    2021-01-31 22:13

    I was in same dilemma when I was reading about memory layout's of C/C++. Here is the link which I followed to get the questions cleared.

    http://www.geeksforgeeks.org/memory-layout-of-c-program/

    The link's main illustration is added here:

    I hope this helps 'the one' finding answers to similar question.

提交回复
热议问题