A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • 4 years ago

In C or C++, how do I increase the size of the stack? What determines the size of the stack anyway?

  • This Question is Closed
  1. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    What do you mean? "Call stack" or a "stack" as a data structure in a program?

  2. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    The call stack

  3. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I never increase my call stack. Why do you need to increase your call stack anyway? Try to write program in "Iterative" manner instead of "recursive" But if you insist, http://lmgtfy.com/?q=c%2B%2B+call+stack+increase

  4. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    The OS should determine the stack size. There may be some kernel calls to request larger stack size to be allocated. Check the specific operating system function calls.

  5. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    In gcc, you can increase the stack size the executable requests with the --stack=[bytes] parameter. Alternatively, in *nix OSs you can use setrlimit in your code or use ulimit -s to set the stack size in the environment.

  6. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.