<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MQX Software Solutions中的主题 How set the correct stack and heap size ?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-set-the-correct-stack-and-heap-size/m-p/643420#M17115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing a multi-task app, using MQX and a K64. I am currently facing at some time a MQX_OUT_OF_MEMORY error, so I have used TAD, and I have some idea which task stack to increase or decrease. My question is about the linker, I see this line :&lt;/P&gt;&lt;P&gt;&amp;nbsp;-Xlinker --defsym=__stack_size__=0x400&amp;nbsp; -Xlinker --defsym=__heap_size__=0x5000 (changed by me)&lt;/P&gt;&lt;P&gt;and it seems the task stack is taken from the heap. So if do the math and add all the task stacks I use, I get about 0x9d00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Do I must understand I was very lucky and this overflow wasn't doing anything bad to me for the moment ? I should then set the heap size to 0x10000 for example ?&lt;/P&gt;&lt;P&gt;- The K64 I use has got 256KB of RAM. Which size maximum can I use for the heap ?&lt;/P&gt;&lt;P&gt;- the (real) stack (size 0x400) is used by all the stuff outside MQX and its tasks ? (startup.c etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Feb 2017 13:47:30 GMT</pubDate>
    <dc:creator>samuelboivineau</dc:creator>
    <dc:date>2017-02-16T13:47:30Z</dc:date>
    <item>
      <title>How set the correct stack and heap size ?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-set-the-correct-stack-and-heap-size/m-p/643420#M17115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing a multi-task app, using MQX and a K64. I am currently facing at some time a MQX_OUT_OF_MEMORY error, so I have used TAD, and I have some idea which task stack to increase or decrease. My question is about the linker, I see this line :&lt;/P&gt;&lt;P&gt;&amp;nbsp;-Xlinker --defsym=__stack_size__=0x400&amp;nbsp; -Xlinker --defsym=__heap_size__=0x5000 (changed by me)&lt;/P&gt;&lt;P&gt;and it seems the task stack is taken from the heap. So if do the math and add all the task stacks I use, I get about 0x9d00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Do I must understand I was very lucky and this overflow wasn't doing anything bad to me for the moment ? I should then set the heap size to 0x10000 for example ?&lt;/P&gt;&lt;P&gt;- The K64 I use has got 256KB of RAM. Which size maximum can I use for the heap ?&lt;/P&gt;&lt;P&gt;- the (real) stack (size 0x400) is used by all the stuff outside MQX and its tasks ? (startup.c etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 13:47:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-set-the-correct-stack-and-heap-size/m-p/643420#M17115</guid>
      <dc:creator>samuelboivineau</dc:creator>
      <dc:date>2017-02-16T13:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: How set the correct stack and heap size ?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-set-the-correct-stack-and-heap-size/m-p/643421#M17116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Samuel:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you use Classic MQX 4.2 or MQX for KSDK 1.3?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 06:21:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-set-the-correct-stack-and-heap-size/m-p/643421#M17116</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2017-02-17T06:21:53Z</dc:date>
    </item>
  </channel>
</rss>

