Sign in to follow this  

Resize Stack Memory drawbacks

This topic is 3341 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have to optimize a program for performance and memory occupation. At the moment the stack commit size is set to 32KB and the reserve size to 16 MB, instead of the default 4 K and 1 M. Could someone explain me what can be the pros and the drawbacks of a similar choice? This program is multithread, and at runtime it uses around 10 thread in concurrence. Increasing these sizes makes the program faster? Thanks Emanuele

Share this post


Link to post
Share on other sites
Not really changing the size of the stack changes how much memory you reserve for stack space(Only important if you make a large number of function calls or allocate a lot of memory on the stack.) It is more of a pass fail number either your app runs or it runs out of stack space and crashes.

Share this post


Link to post
Share on other sites
Sign in to follow this