Will the stack of a C program ever shrink?

前端 未结 3 1979
说谎
说谎 2021-01-19 14:04

I\'ve noticed that every running C program has a private mapping called [stack] that is initially quite small (128k on my machine), but will grow to accomodate any automatic

3条回答
  •  感动是毒
    2021-01-19 14:27

    It's implementation specific, but I know of no commonly used platform which shrinks committed stack memory. It is common for stacks to grow on demand but once space is committed it stays committed.

提交回复
热议问题