Home Forums Programming default stack frame size in VS?

  • This topic has 1 reply, 2 voices, and was last updated 12 years ago by Anonymous.
Viewing 1 reply thread
  • Author
    Posts
    • #6545
      Anonymous
      Inactive

      Hi all,

      Just looking for some information on the default stack frame size in VS (2003, 2005, 2008, whatever).

      Working on some recursive functions, and would like to be aware of the limitations.

      Any know of any resources or tech manuals?

      Cheers,
      B.

    • #40139
      Anonymous
      Inactive

      The default stack size is 1MB, but if that’s not enough you can change it in Project Properties->Linker->System->Stack Reserve/Commit Size. Commit specifies how big the stack is initially (default 4kb), and it is allowed to grow to a maximum size specified by Reserve (default 1MB).

      1MB should be loads though – if you find yourself hitting that limit, maybe you need to rethink whether you could just switch to iteration and save yourself all that function call overhead.

Viewing 1 reply thread
  • The forum ‘Programming’ is closed to new topics and replies.