Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3332064
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:38:55+00:00 2026-05-17T23:38:55+00:00

The Windows Internal book 5th edition has the following comment in page 360. The

  • 0

The Windows Internal book 5th edition has the following comment in page 360.

The stack size for the initial thread is taken from the image—there’s no way 
to specify another size.

I understand that for Windows OS, each thread is given 4K or 16K (depending on system) stack, and the size is fixed.

Then how about the stack in .NET?

  • How big is the stack?
  • The size of the stack is fixed or variable?
  • Is the stack allocated for each thread just like the case of Windows?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:38:55+00:00Added an answer on May 17, 2026 at 11:38 pm

    Yes, the size for the startup thread is determined by a value in the .EXE file header. Necessarily so, it is the OS that creates the thread, before any code in the program can run. It calls the entrypoint of the program, CorExeMain().

    The managed compiler you use writes that value into the EXE file header. Current .NET compilers select 1 MB when you target x86 or Any CPU, 4 MB when you target x64. This is however not fixed, you can modify the value with the Editbin.exe utility, /STACK command line option. You could use this post-build event to get a 2MB stack:

      set path=%path%;$(DevEnvDir);$(DevEnvDir)..\..\vc\bin
      editbin.exe /STACK:2097152 "$(TargetPath)"
    

    The stack size for threads that you create yourself are under your control, the Thread class constructor has overloads that lets you specify the size. You cannot make it too small, if clips the value to 256 KB. That’s necessary, the just-in-time compiler also uses the stack.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am actually reading Windows Internals 5th edition and i am enjoying, although isn't
Windows has an internal mechanism that decides when to show the screensaver (or shut
I have this problem where I open Visual Studio and the internal windows are
I get 500 internal server error in Windows Azure (on localhost too) if I
I use Visual Studio .NET to develop internal applications. I create a Windows control
I have an internal website that is using integrated windows authentication and this website
I have a Windows server running Subversion internal server (1 window service per repository
I wondered if any of you have knowledge of the internal workings of windows
Our internal MVC application uses Windows authentication and we control access to the web
We have an internal system where users can authenticate using Windows authentication but we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.