I&#39;ve asked the same question some time ago (<a href="http://www.mail-archive.com/cmake@cmake.org/msg14883.html">http://www.mail-archive.com/cmake@cmake.org/msg14883.html</a>).<br><br>We had a problem with big number of threads: the 32-bit address space can fit only ~200 threads with such huge stacks. So if you are writing multithreaded application, it is best to remove this option from flags.<br>
<br><div class="gmail_quote">On Mon, Apr 13, 2009 at 9:20 AM, Andrew Maclean <span dir="ltr">&lt;<a href="mailto:andrew.amaclean@gmail.com">andrew.amaclean@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think the reason was that when Visual Studio 6 was used to build VTK<br>
it used to run out of stack space necessitating the large value that<br>
needed to be set.<br>
<br>
I am pretty sure that this was the case because I think I was one of<br>
the people who noted this problem in the &quot;old days&quot;!<br>
<br>
Andrew<br>
<div><div></div><div class="h5"><br>
<br>
On Mon, Apr 13, 2009 at 2:07 AM, Sahn Lam &lt;<a href="mailto:sahn@pobox.com">sahn@pobox.com</a>&gt; wrote:<br>
&gt; Don&#39;t know the reason behind this, but this is how we unset it:<br>
&gt;<br>
&gt;    #<br>
&gt;    # Remove /STACK:10000000 set by CMake. This value for stack size<br>
&gt;    # is very high, limiting the number of threads we can spawn.<br>
&gt;    # Default value used by Windows is 1MB which is good enough.<br>
&gt;    #<br>
&gt;    STRING(REGEX REPLACE &quot;/STACK:[0-9]+&quot; &quot;&quot;<br>
&gt;        CMAKE_EXE_LINKER_FLAGS &quot;${CMAKE_EXE_LINKER_FLAGS}&quot;)<br>
&gt;<br>
&gt;<br>
&gt; On Sun, Apr 12, 2009 at 2:48 AM, Christian Ehrlicher<br>
&gt; &lt;<a href="mailto:Ch.Ehrlicher@gmx.de">Ch.Ehrlicher@gmx.de</a>&gt; wrote:<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; I don&#39;t understand the reason behind this. We&#39;ve a very huge memory<br>
&gt;&gt; footprint because of this on kde4/windows - kded4.exe has ~30 Threads<br>
&gt;&gt; which means 300MB of stack!<br>
&gt;&gt;<br>
&gt;&gt; Is there an easy way to change this?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Thx,<br>
&gt;&gt; Christian<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
___________________________________________<br>
Andrew J. P. Maclean<br>
Centre for Autonomous Systems<br>
The Rose Street Building J04<br>
The University of Sydney  2006  NSW<br>
AUSTRALIA<br>
Ph: +61 2 9351 3283<br>
Fax: +61 2 9351 7474<br>
URL: <a href="http://www.acfr.usyd.edu.au/" target="_blank">http://www.acfr.usyd.edu.au/</a><br>
___________________________________________<br>
<div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>