I'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"><<a href="mailto:andrew.amaclean@gmail.com">andrew.amaclean@gmail.com</a>></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 "old days"!<br>
<br>
Andrew<br>
<div><div></div><div class="h5"><br>
<br>
On Mon, Apr 13, 2009 at 2:07 AM, Sahn Lam <<a href="mailto:sahn@pobox.com">sahn@pobox.com</a>> wrote:<br>
> Don't know the reason behind this, but this is how we unset it:<br>
><br>
> #<br>
> # Remove /STACK:10000000 set by CMake. This value for stack size<br>
> # is very high, limiting the number of threads we can spawn.<br>
> # Default value used by Windows is 1MB which is good enough.<br>
> #<br>
> STRING(REGEX REPLACE "/STACK:[0-9]+" ""<br>
> CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")<br>
><br>
><br>
> On Sun, Apr 12, 2009 at 2:48 AM, Christian Ehrlicher<br>
> <<a href="mailto:Ch.Ehrlicher@gmx.de">Ch.Ehrlicher@gmx.de</a>> wrote:<br>
>> Hi,<br>
>><br>
>> I don't understand the reason behind this. We've a very huge memory<br>
>> footprint because of this on kde4/windows - kded4.exe has ~30 Threads<br>
>> which means 300MB of stack!<br>
>><br>
>> Is there an easy way to change this?<br>
>><br>
>><br>
>> Thx,<br>
>> Christian<br>
>> _______________________________________________<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>
>><br>
> _______________________________________________<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>
><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>