On 5/4/2012 10:08 PM, John Morris wrote:
> I suppose that 2x-4x the original setting might possibly be enough,
> probably don't need 256x.  I'll wait to see if the list suggests any
> heuristics for picking a good number.

The two main approaches I've seen used are to either rigorously prove
the maximum stack size by analyzing the code (complex and generally not
worth the hassle unless lives are at stake), or by filling the stack
region with known values, running the code, seeing how much stack
_actually_ got used, and adding a fudge factor.

There are many other ways to tweak stack size, but since I doubt there
is a strong need to minimize memory usage, adding a fudge factor (even
2x or 4x or more expected usage) seems reasonable.

-- 
Charles Steinkuehler
char...@steinkuehler.net

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to