<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Stack usage on recursive call</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : General Discussion : Stack usage on recursive call]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 27 Apr 2026 17:23:15 +0000</pubDate>
  <lastBuildDate>Fri, 04 Dec 2009 05:35:45 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=15746</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Stack usage on recursive call : Thanks, but these have no effect...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55387&amp;title=stack-usage-on-recursive-call#55387</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 15746<br /><strong>Posted:</strong> 04 December 2009 at 5:35am<br /><br />Thanks, but these have no effect in debug-mode, as it seems :/]]>
   </description>
   <pubDate>Fri, 04 Dec 2009 05:35:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55387&amp;title=stack-usage-on-recursive-call#55387</guid>
  </item> 
  <item>
   <title><![CDATA[Stack usage on recursive call : See also #pragma check_stack(...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55361&amp;title=stack-usage-on-recursive-call#55361</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=233">jimmy</a><br /><strong>Subject:</strong> 15746<br /><strong>Posted:</strong> 03 December 2009 at 10:23am<br /><br />See also <br>#pragma check_stack(&#091; {on | off}&#093; )<br>#pragma check_stack{+ | –}<br><br>&nbsp; Jimmy<br><br>]]>
   </description>
   <pubDate>Thu, 03 Dec 2009 10:23:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55361&amp;title=stack-usage-on-recursive-call#55361</guid>
  </item> 
  <item>
   <title><![CDATA[Stack usage on recursive call : Hi,Start Visual Studio, press...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55360&amp;title=stack-usage-on-recursive-call#55360</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=233">jimmy</a><br /><strong>Subject:</strong> 15746<br /><strong>Posted:</strong> 03 December 2009 at 10:17am<br /><br />Hi,<br><br>Start Visual Studio, press F1 search #pragma , see runtime_checks and click it.<br>Than you see this<br><pre ="code">#pragma runtime_checks( "", off )<br>.<br>.<br>.<br>#pragma runtime_checks( "", restore ) </pre><h4 ="dtH4">Jimmy</h4><br><br>]]>
   </description>
   <pubDate>Thu, 03 Dec 2009 10:17:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55360&amp;title=stack-usage-on-recursive-call#55360</guid>
  </item> 
  <item>
   <title><![CDATA[Stack usage on recursive call : I think I&amp;#039;ll disable runtime...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55358&amp;title=stack-usage-on-recursive-call#55358</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 15746<br /><strong>Posted:</strong> 03 December 2009 at 9:09am<br /><br /><P>I think I'll disable runtime check in this particular cpp file. In optimized release-mode the stack usage is 0 bytes (!).</P><DIV></DIV><DIV></DIV>Do you know a #pragma to disable runtime check?]]>
   </description>
   <pubDate>Thu, 03 Dec 2009 09:09:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55358&amp;title=stack-usage-on-recursive-call#55358</guid>
  </item> 
  <item>
   <title><![CDATA[Stack usage on recursive call : Hi,Every parameter need 4 Byte.CALL...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55357&amp;title=stack-usage-on-recursive-call#55357</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=233">jimmy</a><br /><strong>Subject:</strong> 15746<br /><strong>Posted:</strong> 03 December 2009 at 8:10am<br /><br />Hi,<br><br>Every parameter need 4 Byte.<br>CALL need 4 Byte.<br>Save EBP need 4 Byte.<br>Save some other register need 3*4 Byte.<br><br>"Full runtime check" need 160 Byte. You can disable it.<br><br>if i have only 1 parameter it need 108 Byte.<br><br>i calculate<br>4 Byte&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; parameter<br>4 Byte&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; call<br>4 Byte&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; save ebp<br>4 byte&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; save this pointer<br>8 byte&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for local variables<br>---------<br>24 Byte&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br><br>108 - 24 = 84 Byte too much ???<br>==================<br>i don't know more.<br><br>&nbsp; Jimmy<br><br>]]>
   </description>
   <pubDate>Thu, 03 Dec 2009 08:10:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55357&amp;title=stack-usage-on-recursive-call#55357</guid>
  </item> 
  <item>
   <title><![CDATA[Stack usage on recursive call : Please see attached sample. It...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55356&amp;title=stack-usage-on-recursive-call#55356</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 15746<br /><strong>Posted:</strong> 03 December 2009 at 6:41am<br /><br />Please see attached sample. It demonstrates&nbsp;this.<DIV>&nbsp;</DIV><DIV>It's totally sick! :(</DIV>]]>
   </description>
   <pubDate>Thu, 03 Dec 2009 06:41:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55356&amp;title=stack-usage-on-recursive-call#55356</guid>
  </item> 
  <item>
   <title><![CDATA[Stack usage on recursive call : Sure, but 68 bytes?! It makes...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55307&amp;title=stack-usage-on-recursive-call#55307</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 15746<br /><strong>Posted:</strong> 01 December 2009 at 6:19am<br /><br />Sure, but 68 bytes?! It makes it hard to debug my recursive function, since it blows the stack. 6 parameters yields 432&nbsp;bytes, lol...<DIV>&nbsp;</DIV><DIV>In Release-mode the recursive call is optimized away completely, so there is no need in rewriting my algorithm.</DIV>]]>
   </description>
   <pubDate>Tue, 01 Dec 2009 06:19:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55307&amp;title=stack-usage-on-recursive-call#55307</guid>
  </item> 
  <item>
   <title><![CDATA[Stack usage on recursive call : Additional stack checking code??? ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55269&amp;title=stack-usage-on-recursive-call#55269</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 15746<br /><strong>Posted:</strong> 30 November 2009 at 4:44am<br /><br />Additional stack checking code???]]>
   </description>
   <pubDate>Mon, 30 Nov 2009 04:44:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55269&amp;title=stack-usage-on-recursive-call#55269</guid>
  </item> 
  <item>
   <title><![CDATA[Stack usage on recursive call : VS 2008 SP1. Consider this function: void...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55264&amp;title=stack-usage-on-recursive-call#55264</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 15746<br /><strong>Posted:</strong> 29 November 2009 at 5:08pm<br /><br /><DIV>VS 2008 SP1.</DIV><P>Consider this function:</P><DIV>void foo(int x)</DIV><DIV>{</DIV><DIV>&nbsp;&nbsp;&nbsp; foo(x + 1);</DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>If I add a parameter "int y", I would expect the stack usage to increase by 4 bytes. However, in my case (in debug mode) it increases with 72 bytes.</DIV><DIV>&nbsp;</DIV><DIV>Can somebody please explain this? 68 extra bytes is&nbsp;a LOT! :(</DIV><DIV>&nbsp;</DIV><DIV><strong>Sample program: <a href="http://forum.codejock.com/uploads/20091203_064021_StackBomb.zip" target="_blank">uploads/20091203_064021_StackBomb.zip</A></strong></DIV>]]>
   </description>
   <pubDate>Sun, 29 Nov 2009 17:08:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15746&amp;PID=55264&amp;title=stack-usage-on-recursive-call#55264</guid>
  </item> 
 </channel>
</rss>