<?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>MCUXpresso IDE中的主题 Analyze Heap size</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1040139#M5535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to analyze a heap size?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that there is a feature of FreeRTOS heap size monitoring.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Standard C library malloc or even sprintf uses heap memory that is not managed region of memory by RTOS.&lt;/P&gt;&lt;P&gt;I think such standard C library is not recommended to use when RTOS is used due to non thread safe. But, some customers still want to use such C standard library and analyze the heap size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hiroshi,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Aug 2020 08:11:48 GMT</pubDate>
    <dc:creator>hiroshihiraga</dc:creator>
    <dc:date>2020-08-18T08:11:48Z</dc:date>
    <item>
      <title>Analyze Heap size</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1040139#M5535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to analyze a heap size?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that there is a feature of FreeRTOS heap size monitoring.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Standard C library malloc or even sprintf uses heap memory that is not managed region of memory by RTOS.&lt;/P&gt;&lt;P&gt;I think such standard C library is not recommended to use when RTOS is used due to non thread safe. But, some customers still want to use such C standard library and analyze the heap size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hiroshi,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2020 08:11:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1040139#M5535</guid>
      <dc:creator>hiroshihiraga</dc:creator>
      <dc:date>2020-08-18T08:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Analyze Heap size</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1040140#M5536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hiroshi,&lt;/P&gt;&lt;P&gt;MCUxpresso IDE has tools for FreeRTOS HEAP usage monitor. This is the easiest way.&lt;/P&gt;&lt;P&gt;FreeRTOS itself hasn't such a library. There is some discuss on internet about how to monitor. People have to write monitor code by themselves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 03:04:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1040140#M5536</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2020-08-19T03:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Analyze Heap size</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1040141#M5537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jingpan"&gt;jingpan&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, ok. I will look up the internet.&lt;/P&gt;&lt;P&gt;And, don't you have any information about monitoring the heap size that is not managed by RTOS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hiroshi,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 06:44:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1040141#M5537</guid>
      <dc:creator>hiroshihiraga</dc:creator>
      <dc:date>2020-08-19T06:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Analyze Heap size</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1040142#M5538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mixing heaps (C library and FreeRTOS) is not a good idea and could lead to some very hardtop-debug issues. However, if you insist, then see&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/389026"&gt;Heap allocation/checking in Redlib&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the final reply here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/521689"&gt;https://community.nxp.com/thread/521689&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 07:41:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1040142#M5538</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2020-08-19T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Analyze Heap size</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1389481#M7681</link>
      <description>&lt;P&gt;How do you avoid mixing heaps in case you want to use FreeRTOS and C library functions when some of them use malloc() and free()?&lt;/P&gt;&lt;P&gt;I see at least to possible approaches:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Redirect malloc() and free() to their FreeRTOS equivalents defined in one of the heap memory schemes&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;OR&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Define the stubs needed for malloc/free to work (e.g., sbrk(), ...) and implement FreeRTOS&amp;nbsp;&lt;SPAN&gt;pvPortMalloc() and&amp;nbsp;vPortFree() by using malloc()/free()&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The latter is &lt;A href="https://nadler.com/embedded/NXP_newlibAndFreeRTOS.html" target="_self"&gt;Dave Nadler's approach&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Maybe you suggest a different third approach?&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Dan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 10:05:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1389481#M7681</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2021-12-20T10:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Analyze Heap size</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1390210#M7684</link>
      <description>&lt;P&gt;Ups, have to reply to myself.&lt;/P&gt;&lt;P&gt;I read that &lt;A href="https://nadler.com/embedded/NXP_newlibAndFreeRTOS.html" target="_self"&gt;Dave Nadler&lt;/A&gt; already tried the first approach and stopped after he figured that FreeRTOS heap implementations would not support &lt;FONT face="courier new,courier"&gt;realloc()&lt;/FONT&gt;directly.&amp;nbsp; One would have to &lt;A href="https://forums.freertos.org/t/when-to-enable-configuse-newlib-reentrant-macro/7984" target="_self"&gt;implement this function&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;So I guess the easiest way is to redirect&amp;nbsp;&lt;SPAN&gt;pvPortMalloc() and&amp;nbsp;vPortFree() using &lt;A href="https://github.com/DRNadler/FreeRTOS_helpers" target="_self"&gt;D. Nadler's code&lt;/A&gt;. However, with this approach, one forfeits the use of Heap View in MCUXpresso IDE.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 08:38:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Analyze-Heap-size/m-p/1390210#M7684</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2021-12-22T08:38:23Z</dc:date>
    </item>
  </channel>
</rss>

