2

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

Nick

Nick Butler
  • 24,045
  • 4
  • 49
  • 70

1 Answers1

2

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.

Community
  • 1
  • 1
Adam Markowitz
  • 12,919
  • 3
  • 29
  • 21