<div dir="ltr">Thanks for answer,<div><br></div><div style>I will explain bit more to explain my situation.</div><div style><br></div><div style>I have code written, and I cannot modify. I want to fix user stack size for all threads in glibc, once I know how much stack size each thread take.</div>
<div style><br>Thanks</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 3, 2013 at 11:37 AM, Sankar P <span dir="ltr"><<a href="mailto:sankar.curiosity@gmail.com" target="_blank">sankar.curiosity@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Tue, Apr 2, 2013 at 6:25 PM, naveen yadav <<a href="mailto:yad.naveen@gmail.com">yad.naveen@gmail.com</a>> wrote:<br>
> Dear All,<br>
><br>
> I have very complex user space application contain more then 400 threads. I<br>
> want to limit the stack size in user space, for this I want to know how much<br>
> stack size each thread use in worst case.<br>
<br>
</div>Well, this does not answer your question directly and is not related<br>
to the kernel but I want to suggest something.<br>
<br>
I have been using the Go programming language from Google for a few<br>
days and it allows you to spawn goroutines, which are similar to<br>
threads. But the underlying implementation does not create an OS<br>
thread for each go routine. As a result, your application can have<br>
thousands of goroutines. This model of threading was implemented so<br>
that thread space is not exhausted. You can consider using Go (or any<br>
other such lightweight threading library) if you need a lot of<br>
threads.<br>
<br>
Sorry if it is not useful.<br>
<br>
Sankar<br>
<a href="http://psankar.blogspot.com" target="_blank">http://psankar.blogspot.com</a><br>
</blockquote></div><br></div>