<?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>topic Heap usage don't update when use vPortFree. in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1788949#M218727</link>
    <description>&lt;P&gt;Hello, i'm using the MIMXRT1060-EVK. In my project i'm using freeRtos and lwip with the heap_3.c. When i use vPortFree, the value of the heap don't update.&amp;nbsp;There's something I can do to update heap usage?&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jan 2024 19:45:29 GMT</pubDate>
    <dc:creator>andréluis</dc:creator>
    <dc:date>2024-01-15T19:45:29Z</dc:date>
    <item>
      <title>Heap usage don't update when use vPortFree.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1788949#M218727</link>
      <description>&lt;P&gt;Hello, i'm using the MIMXRT1060-EVK. In my project i'm using freeRtos and lwip with the heap_3.c. When i use vPortFree, the value of the heap don't update.&amp;nbsp;There's something I can do to update heap usage?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 19:45:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1788949#M218727</guid>
      <dc:creator>andréluis</dc:creator>
      <dc:date>2024-01-15T19:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Heap usage don't update when use vPortFree.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1788993#M218730</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help me with the following infromation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What SDK version are you using?&lt;/P&gt;
&lt;P&gt;Are you trying a SDK example?&lt;/P&gt;
&lt;P&gt;How you are making and verifying the heap change?&lt;/P&gt;
&lt;P&gt;If I'm understanding correct you would like to use heap 3, but in your project the heap in use in another one, am I right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 22:34:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1788993#M218730</guid>
      <dc:creator>DanielRuvalcaba</dc:creator>
      <dc:date>2024-01-15T22:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Heap usage don't update when use vPortFree.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1789649#M218776</link>
      <description>&lt;P&gt;Hi Daniel&lt;BR /&gt;What SDK version are you using?&lt;BR /&gt;I'm using the SDK 2.14 of MIMXRT1060-EVK&lt;/P&gt;&lt;P&gt;Are you trying a SDK example?&lt;BR /&gt;Yes. I'm working with evkbmimxrt1060_lwip_ipv4_ipv6_echo_freertos.&lt;/P&gt;&lt;P&gt;How you are making and verifying the heap change?&lt;/P&gt;&lt;P&gt;I attach an image showing how i making the verify of the heap.&lt;/P&gt;&lt;P&gt;If I'm understanding correct you would like to use heap 3, but in your project the heap in use in another one, am I right?&lt;/P&gt;&lt;P&gt;In my project it's using heap_3.c.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 17:04:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1789649#M218776</guid>
      <dc:creator>andréluis</dc:creator>
      <dc:date>2024-01-16T17:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Heap usage don't update when use vPortFree.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1789766#M218783</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;I'm sorry for the misunderstanding, I thought you were trying to change the FreeRTOS Heap implementation.&lt;/P&gt;
&lt;P&gt;Is there a specific path to get this behavior? If that's the case, could you please tell me how you are running the example so I can try to replicate it on my side?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 22:19:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1789766#M218783</guid>
      <dc:creator>DanielRuvalcaba</dc:creator>
      <dc:date>2024-01-16T22:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Heap usage don't update when use vPortFree.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1790351#M218816</link>
      <description>&lt;P&gt;Hello Daniel, in the picture attach i put a breakpoint when my application call the vPortFree. In my application, i send to him some blocks, like function blocks of PLC, and the value of my heap increase because the blocks. But, when i remove the blocks from my application, the value of the heap don't decreases, showing the same value. In the pictures i show the value before the dowload of the application, the process of download an application, update the value of the heap, download an empty application and the value of the heap don't change.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 13:38:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1790351#M218816</guid>
      <dc:creator>andréluis</dc:creator>
      <dc:date>2024-01-17T13:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Heap usage don't update when use vPortFree.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1792310#M218949</link>
      <description>&lt;P&gt;In other words, in the &lt;EM&gt;evkbmimxrt1060_lwip_ipv4_ipv6_echo_freertos&lt;/EM&gt; SDK example, when you use vPortFree, you don’t see a change in the heap usage. The heap stays the same, am I correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 22:07:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1792310#M218949</guid>
      <dc:creator>DanielRuvalcaba</dc:creator>
      <dc:date>2024-01-19T22:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Heap usage don't update when use vPortFree.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1792917#M219008</link>
      <description>&lt;P&gt;Hello Daniel. Yes. This is the problem. I use vPortFree and the heap usage don't change.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 10:40:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1792917#M219008</guid>
      <dc:creator>andréluis</dc:creator>
      <dc:date>2024-01-22T10:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Heap usage don't update when use vPortFree.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1794108#M219111</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/111757"&gt;@andréluis&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Heap3 scheme only wraps the standard C library malloc() and free() functions to provide thread safety. In this case, when you use pvPortMalloc(), the function will use malloc() to allocate memory.&lt;/P&gt;
&lt;P&gt;It's not like vPortFree() isn't working. It is, but you will not see the change in the &lt;EM&gt;Heap and Stack Usage&lt;/EM&gt; option because as per my understanding, free() doesn't delete nor clear the memory, it only marks the space as available for future malloc() allocations.&lt;/P&gt;
&lt;P&gt;You can see this by yourself by allocating memory using&amp;nbsp;pvPortMalloc(), then free it with&amp;nbsp;vPortFree(). Then immediately allocate the same amount of memory, you will see that the&amp;nbsp;&lt;EM&gt;Heap and Stack Usage&amp;nbsp;&lt;/EM&gt;will increase only once and not twice.&lt;/P&gt;
&lt;P&gt;For more information regarding this, I would recommend you take a look to the FreeRTOS documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 21:31:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1794108#M219111</guid>
      <dc:creator>DanielRuvalcaba</dc:creator>
      <dc:date>2024-01-23T21:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Heap usage don't update when use vPortFree.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1796910#M219311</link>
      <description>Hi Daniel, in my application, i need to calculate how much a block consume when i select it in the program. That's why i need to use the free, because if i remove a block, i need to calculate how much RAM became free. That's a way to change the free() function?</description>
      <pubDate>Mon, 29 Jan 2024 14:22:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Heap-usage-don-t-update-when-use-vPortFree/m-p/1796910#M219311</guid>
      <dc:creator>andréluis</dc:creator>
      <dc:date>2024-01-29T14:22:06Z</dc:date>
    </item>
  </channel>
</rss>

