views:

404

answers:

1

I want to find out the stack size of .NET thread pool threads in CLR 4.0. Any ideas?

Nick

+1  A: 

See a similar question here on SO. Doesn't look promising. Additionally, see this link from an MS guy on the issue.

Here's also an untested reference I located that is in assembler:


// OK, let's go assembly:

DWORD dwStackSize; //size of current thread's stack
_asm {
     mov eax,fs:[4]
     sub eax,fs:[8]
     mov dwStackSize,eax
}

// Don't know how to do this on non-intel CPU's.


Good luck. Also, be sure to ask yourself what you are doing that really needs this information and if there isn't another solution to your problem.

Adam Markowitz