<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13080">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">utils.h: Set lower bound for thread stack size to PTHREAD_STACK_MIN<br><br>ASTERISK-28590 #close<br><br>Change-Id: I51abce00c04d0a06550bda5205580705185b9c1c<br>---<br>M include/asterisk/utils.h<br>1 file changed, 8 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/80/13080/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h</span><br><span>index bcd73aa..bd4664b 100644</span><br><span>--- a/include/asterisk/utils.h</span><br><span>+++ b/include/asterisk/utils.h</span><br><span>@@ -423,10 +423,16 @@</span><br><span>  * Thread management support (should be moved to lock.h or a different header)</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define AST_STACKSIZE (((sizeof(void *) * 8 * 8) - 16) * 1024)</span><br><span style="color: hsl(120, 100%, 40%);">+#if defined(PTHREAD_STACK_MIN)</span><br><span style="color: hsl(120, 100%, 40%);">+# define AST_STACK_MIN PTHREAD_STACK_MIN</span><br><span style="color: hsl(120, 100%, 40%);">+#else</span><br><span style="color: hsl(120, 100%, 40%);">+# define AST_STACK_MIN 0</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define AST_STACKSIZE MAX((((sizeof(void *) * 8 * 8) - 16) * 1024), AST_STACK_MIN)</span><br><span> </span><br><span> #if defined(LOW_MEMORY)</span><br><span style="color: hsl(0, 100%, 40%);">-#define AST_BACKGROUND_STACKSIZE (((sizeof(void *) * 8 * 2) - 16) * 1024)</span><br><span style="color: hsl(120, 100%, 40%);">+#define AST_BACKGROUND_STACKSIZE MAX((((sizeof(void *) * 8 * 2) - 16) * 1024), AST_STACK_MIN)</span><br><span> #else</span><br><span> #define AST_BACKGROUND_STACKSIZE AST_STACKSIZE</span><br><span> #endif</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13080">change 13080</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/13080"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I51abce00c04d0a06550bda5205580705185b9c1c </div>
<div style="display:none"> Gerrit-Change-Number: 13080 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>