thread stack size

  • Thread starter Thread starter Kovan Akrei
  • Start date Start date
K

Kovan Akrei

Hi,
I would like to know how big is the default stack size of a thread in .Net?
Is this size static or is dynamic during runtime. How do I change this size
before start and after start of a multi threaded program?
I know that 32 bit windows (2000 and XP) alloacte about 1 Mb of memory for
each process. Does windows treat a thread in .Net as a process and hence
allocate 1 Mb of memory for each thread?

Many thanks in advance

Kovan
 
I would like to know how big is the default stack size of a thread in .Net?

There's currently a 1:1 mapping between managed and native thread, and
the threads have a default stack size of 1 Mb unless you specify
something else in the executable.

How do I change this size before start and
Editbin.exe


after start

You could call the native CreateThread API and specify some stack
size, then call managed code from that thread.



Mattias
 
How do I change this size before start and
Editbin.exe
Is this utility a part of .Net visual studio or .Net SDK? I can not find it
on my computer. I have .Net visual studio 2003 installed. Is it possible to
instruct CLR to impose a certain thread stack size (something similar to
Java where you send som parameteres spesifying the size of thread stacksize
in your program) ?
You could call the native CreateThread API and specify some stack
size, then call managed code from that thread.
I'm only interessted in what .Net have to offer. I do not want to call
anything outside of .Net class library.

Thanks for your reply.

Kovan
 
Kovan,
Is this utility a part of .Net visual studio or .Net SDK? I can not find it
on my computer. I have .Net visual studio 2003 installed.

It comes with VS. Did you install the Visual C++ parts of it? I have
Editbin.exe located in VS.NET_dir\Vc7\bin

Is it possible to
instruct CLR to impose a certain thread stack size (something similar to
Java where you send som parameteres spesifying the size of thread stacksize
in your program) ?

Not that I know.

I'm only interessted in what .Net have to offer.

Unfortunately I don't think it has anything to offer that will help
you here.



Mattias
 
It comes with VS. Did you install the Visual C++ parts of it? I have
Editbin.exe located in VS.NET_dir\Vc7\bin
Founded it. the strangest thing is happen right now. I was searching for
that file and I got no result, but it does lies in VC7 directory. Searched
again (the whole hardisc). No results are found.
May be there is something wrong with my explorer search.
Unfortunately I don't think it has anything to offer that will help
you here.
Thats too bad.

kovan
 
Back
Top