<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[stack overflow bei Speicherzuweisung für 600-KB-Array?]]></title><description><![CDATA[<p>Hallo ihr-mit-Programmierwissen-gesegneten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>in meinem aktuellen Projekt (ca 1 MB Speicherbedarf) deklariere ich einen unsigned char array mit rund 600'000 Elementen. Genau in dieser Zeile schmiert das Programm leider immer ab: stack overflow. Bei 600 KB??? Das kann's doch nicht sein! Andere Programme mit einem vielfachen an Speicherbedarf laufen ohne Probleme.<br />
Leider habe ich noch keine Erfahrung in exception handling. Kann es daran liegen, dass alle anderen Programme jeweils exceptions abfangen und meines nicht? Wie verhindere ich einen stack overflow bzw. wie umgehe ich ihn? Zur Info: Notebook mit 256 MB RAM, Win XP Home (das meines Wissens schon selbst rund 256 MB schluckt).</p>
<p>Danke für eure Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/130537/stack-overflow-bei-speicherzuweisung-für-600-kb-array</link><generator>RSS for Node</generator><lastBuildDate>Wed, 26 Aug 2026 22:23:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/130537.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Dec 2005 23:56:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to stack overflow bei Speicherzuweisung für 600-KB-Array? on Fri, 23 Dec 2005 23:57:13 GMT]]></title><description><![CDATA[<p>Hallo ihr-mit-Programmierwissen-gesegneten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>in meinem aktuellen Projekt (ca 1 MB Speicherbedarf) deklariere ich einen unsigned char array mit rund 600'000 Elementen. Genau in dieser Zeile schmiert das Programm leider immer ab: stack overflow. Bei 600 KB??? Das kann's doch nicht sein! Andere Programme mit einem vielfachen an Speicherbedarf laufen ohne Probleme.<br />
Leider habe ich noch keine Erfahrung in exception handling. Kann es daran liegen, dass alle anderen Programme jeweils exceptions abfangen und meines nicht? Wie verhindere ich einen stack overflow bzw. wie umgehe ich ihn? Zur Info: Notebook mit 256 MB RAM, Win XP Home (das meines Wissens schon selbst rund 256 MB schluckt).</p>
<p>Danke für eure Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948955</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948955</guid><dc:creator><![CDATA[Praetorian]]></dc:creator><pubDate>Fri, 23 Dec 2005 23:57:13 GMT</pubDate></item><item><title><![CDATA[Reply to stack overflow bei Speicherzuweisung für 600-KB-Array? on Sat, 24 Dec 2005 00:05:23 GMT]]></title><description><![CDATA[<p>Hmm...ich bin mir nicht sicher aber versuch mal folgendes:</p>
<pre><code class="language-cpp">unsigned char* buf = new char[600000];
</code></pre>
<p>Der Stack soll ja sehr begrenzt sein.(hab ich gelesen)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948957</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948957</guid><dc:creator><![CDATA[alex89ru]]></dc:creator><pubDate>Sat, 24 Dec 2005 00:05:23 GMT</pubDate></item><item><title><![CDATA[Reply to stack overflow bei Speicherzuweisung für 600-KB-Array? on Sat, 24 Dec 2005 00:20:35 GMT]]></title><description><![CDATA[<p>Wow, ich glaube das war's! Jetzt kratzt der PC zwar an einer anderen Stelle ab (Access violation), aber das erste Problem ist wohl behoben... danke, alex89ru!</p>
<p>Ist ja komisch, dass der Stack so stark begrenzt ist...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948958</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948958</guid><dc:creator><![CDATA[Praetorian]]></dc:creator><pubDate>Sat, 24 Dec 2005 00:20:35 GMT</pubDate></item><item><title><![CDATA[Reply to stack overflow bei Speicherzuweisung für 600-KB-Array? on Sat, 24 Dec 2005 00:29:46 GMT]]></title><description><![CDATA[<p>Die Standardgröße für den Stack ist oft auf 1MB eingestellt. Du kannst also diese Größe erhöhen oder eben das Array auf dem Heap anlegen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948967</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948967</guid><dc:creator><![CDATA[User---]]></dc:creator><pubDate>Sat, 24 Dec 2005 00:29:46 GMT</pubDate></item><item><title><![CDATA[Reply to stack overflow bei Speicherzuweisung für 600-KB-Array? on Wed, 28 Dec 2005 23:07:07 GMT]]></title><description><![CDATA[<blockquote>
<p>Die Standardgröße für den Stack ist oft auf 1MB eingestellt.</p>
</blockquote>
<p>Für jeden Thread?<br />
So viel?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/951834</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/951834</guid><dc:creator><![CDATA[Stack pro Thread]]></dc:creator><pubDate>Wed, 28 Dec 2005 23:07:07 GMT</pubDate></item><item><title><![CDATA[Reply to stack overflow bei Speicherzuweisung für 600-KB-Array? on Thu, 29 Dec 2005 18:11:52 GMT]]></title><description><![CDATA[<p>User--- schrieb:</p>
<blockquote>
<p>...oder eben das Array auf dem Heap anlegen.</p>
</blockquote>
<p>Das würde ich auch empfehlen. Auf dem Heap kannste besser mit großen Objekten rumpfuschen. Macht halt a biserl Arbeit: einmal new + delete, aber sonst nicht weiter aufwändiger.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/952332</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/952332</guid><dc:creator><![CDATA[hackbert]]></dc:creator><pubDate>Thu, 29 Dec 2005 18:11:52 GMT</pubDate></item><item><title><![CDATA[Reply to stack overflow bei Speicherzuweisung für 600-KB-Array? on Thu, 29 Dec 2005 19:33:23 GMT]]></title><description><![CDATA[<p>User--- schrieb:</p>
<blockquote>
<p>Die Standardgröße für den Stack ist oft auf 1MB eingestellt. Du kannst also diese Größe erhöhen oder eben das Array auf dem Heap anlegen.</p>
</blockquote>
<p>wie ändere ich die gröse bei visual studio 6.0 ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/952390</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/952390</guid><dc:creator><![CDATA[ajax]]></dc:creator><pubDate>Thu, 29 Dec 2005 19:33:23 GMT</pubDate></item><item><title><![CDATA[Reply to stack overflow bei Speicherzuweisung für 600-KB-Array? on Thu, 29 Dec 2005 20:49:34 GMT]]></title><description><![CDATA[<p>ajax schrieb:</p>
<blockquote>
<p>User--- schrieb:</p>
<blockquote>
<p>Die Standardgröße für den Stack ist oft auf 1MB eingestellt. Du kannst also diese Größe erhöhen oder eben das Array auf dem Heap anlegen.</p>
</blockquote>
<p>wie ändere ich die gröse bei visual studio 6.0 ?</p>
</blockquote>
<p>ist glaube ich nicht von compilier abhängig oder?</p>
<p>naja würde ich dir nicht empfehlen.</p>
<p>mfg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/952413</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/952413</guid><dc:creator><![CDATA[joomoo]]></dc:creator><pubDate>Thu, 29 Dec 2005 20:49:34 GMT</pubDate></item><item><title><![CDATA[Reply to stack overflow bei Speicherzuweisung für 600-KB-Array? on Thu, 29 Dec 2005 20:54:41 GMT]]></title><description><![CDATA[<p>Jopp lieber auf dem Heap alozieren das ist besser als irgend was am Compilierer zupfuschen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/952416</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/952416</guid><dc:creator><![CDATA[MartinMilbret]]></dc:creator><pubDate>Thu, 29 Dec 2005 20:54:41 GMT</pubDate></item><item><title><![CDATA[Reply to stack overflow bei Speicherzuweisung für 600-KB-Array? on Thu, 29 Dec 2005 23:58:11 GMT]]></title><description><![CDATA[<p>Stack pro Thread schrieb:</p>
<blockquote>
<p>Für jeden Thread?<br />
So viel?</p>
</blockquote>
<p>Ja, wird aber nur on demand tatsaechlich alloziert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/952510</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/952510</guid><dc:creator><![CDATA[Ringding]]></dc:creator><pubDate>Thu, 29 Dec 2005 23:58:11 GMT</pubDate></item></channel></rss>