All threads except for the main thread in a multithreaded program have a fixed stack size. This function allows you to set stack size for future threads that are created by Ns_BeginThread or Ns_BeginDetachedThread. You may need to increase the thread stack size if you have deeply-nested function calls which are causing stack overflow.