<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TIL on</title><link>https://www.alexander-koepke.de/categories/til/</link><description>Recent content in TIL on</description><generator>Hugo</generator><language>de-de</language><lastBuildDate>Wed, 18 Oct 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://www.alexander-koepke.de/categories/til/index.xml" rel="self" type="application/rss+xml"/><item><title>Dotnet default stack size</title><link>https://www.alexander-koepke.de/post/2023-10-18-til-dotnet-stack-size/</link><pubDate>Wed, 18 Oct 2023 00:00:00 +0000</pubDate><guid>https://www.alexander-koepke.de/post/2023-10-18-til-dotnet-stack-size/</guid><description>&lt;p&gt;&lt;strong&gt;T&lt;/strong&gt;oday &lt;strong&gt;I&lt;/strong&gt; &lt;strong&gt;L&lt;/strong&gt;earned that the default stack size for threads in dotnet e.g. the ThreadPool threads is OS dependent. On Windows it is &lt;em&gt;1.5 MiB&lt;/em&gt;, on Linux, MacOs it is dependent on the concrete OS version. To determine the actual default thread size you have to run &lt;code&gt;ulimit -s&lt;/code&gt;. For Ubuntu 22.04 it is &lt;em&gt;8192 bytes&lt;/em&gt; and for macOS 14.2 it is &lt;em&gt;8176 bytes&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It is possible to configure the default stack size via environment variable e.g. to set the stack to 1.5Mib set &lt;code&gt;DOTNET_DefaultStackSize=180000&lt;/code&gt; (the value is interpreted as hex).&lt;/p&gt;</description></item></channel></rss>