When do you worry about stack size?

前端 未结 19 1215
难免孤独
难免孤独 2020-12-10 12:41

When you are programming in a language that allows you to use automatic allocation for very large objects, when and how do you worry about stack size? Are there any rules o

19条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-10 13:39

    Only time really is when you are threading and have to define it yourself, when you are doing recursion or when for some reason you are allocating to the stack. Otherwise the compiler takes care of making sure you have enough stack space.

    CreateThread by default only allocates 0x100000 bytes for the stack.

提交回复
热议问题