Sign in to follow this  
Emanuele Russo

Resize Stack Memory drawbacks

Recommended Posts

Emanuele Russo    122
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
stonemetal    288
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