www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Defult stack size on Windows?

reply "Nick Sabalausky" <a a.a> writes:
Anyone know what DMD/OPTLINK's default stack size on windows is? Or how to 
find out?

Also, I don't suppose there's a way to give a linker flag to DMD that it'll 
simply ignore on non-Windows platforms, is there?

-------------------------------
Not sent from an iPhone.
Feb 14 2011
parent reply Simon <s.d.hammett gmail.com> writes:
On 14/02/2011 22:47, Nick Sabalausky wrote:
 Anyone know what DMD/OPTLINK's default stack size on windows is? Or how to
 find out?

Dunno.
 Also, I don't suppose there's a way to give a linker flag to DMD that it'll
 simply ignore on non-Windows platforms, is there?

Last time I played with it you can't pass any linker flags via DMD cos of a bug. If you do it separately then you can use the /stack switch: http://www.digitalmars.com/ctg/ctgLinkSwitches.html#stack -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk
Feb 15 2011
parent Simon <s.d.hammett gmail.com> writes:
On 15/02/2011 18:22, Simon wrote:
 On 14/02/2011 22:47, Nick Sabalausky wrote:
 Anyone know what DMD/OPTLINK's default stack size on windows is? Or
 how to
 find out?

Dunno.

Actually if you have visual studio installed you can use the dumpbin utility. the /headers switch prints out the initial stack size: 100000 size of stack reserve 1000 size of stack commit Looks like dmd is defaulting to 4k. Obviously that doesn't apply to thread spawned at runtime; for windows the default is 4k again, though d-runtime might specify more or less. -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk
Feb 16 2011