C program with minimum RAM

后端 未结 6 1622
离开以前
离开以前 2021-02-08 15:33

I want to understand the memory management in C and C++ programming for Application Development. Application will run on the PC.

If I want to make a program which uses R

6条回答
  •  半阙折子戏
    2021-02-08 16:31

    if this is a PC, then by default, you will be given a stack of a certain size ( you can make it bigger or smaller ). Using this stack is more efficient RAM wise than using global variables. because your ram usage will be the fixed stack size + globals + other stuff ( program, heap etc). The stack acts as a resuable piece of memory.

提交回复
热议问题