<?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のトピックRe: MQX memory allocation</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-memory-allocation/m-p/1906707#M18862</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/235179"&gt;@marcomello95&lt;/a&gt;&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MQX uses its own memory allocation system, which does not reply on heap.&amp;nbsp; The default MQX memory pool, where MQX kernel allocates system memory,&amp;nbsp; is between&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;__KERNEL_DATA_START and __KERNEL_DATA_END (symbols generated during bsp linkage).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT class="&amp;amp;quothighlight&amp;quot;"&gt;&lt;STRONG&gt;MQX&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;allocates&amp;nbsp;&lt;/SPAN&gt;&lt;FONT class="&amp;amp;quothighlight&amp;quot;"&gt;&lt;STRONG&gt;memory&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;using function _mem_alloc_system(). On top of this, in bsp we can define malloc() to call _mem_alloc_system(), to do this you need to follow these steps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; First you have to define _mem_alloc_system* in preprocessor to be malloc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define _mem_alloc_system malloc&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Then disable bsp "duplicate" definition of malloc (either by link order or be removing the duplicate definition from the sources).&lt;/SPAN&gt;&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, 12 Jul 2024 02:56:21 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2024-07-12T02:56:21Z</dc:date>
    <item>
      <title>MQX memory allocation</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-memory-allocation/m-p/1889529#M18854</link>
      <description>&lt;P&gt;I'd like to understand how MQX really allocate memory. I couldn't fint it in the Reference Manual or in user guide. Is it using the HEAP? Is it using other regions? I'm searching to understand this mechanism.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 13:15:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-memory-allocation/m-p/1889529#M18854</guid>
      <dc:creator>marcomello95</dc:creator>
      <dc:date>2024-06-18T13:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: MQX memory allocation</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-memory-allocation/m-p/1906707#M18862</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/235179"&gt;@marcomello95&lt;/a&gt;&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MQX uses its own memory allocation system, which does not reply on heap.&amp;nbsp; The default MQX memory pool, where MQX kernel allocates system memory,&amp;nbsp; is between&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;__KERNEL_DATA_START and __KERNEL_DATA_END (symbols generated during bsp linkage).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT class="&amp;amp;quothighlight&amp;quot;"&gt;&lt;STRONG&gt;MQX&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;allocates&amp;nbsp;&lt;/SPAN&gt;&lt;FONT class="&amp;amp;quothighlight&amp;quot;"&gt;&lt;STRONG&gt;memory&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;using function _mem_alloc_system(). On top of this, in bsp we can define malloc() to call _mem_alloc_system(), to do this you need to follow these steps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; First you have to define _mem_alloc_system* in preprocessor to be malloc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define _mem_alloc_system malloc&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Then disable bsp "duplicate" definition of malloc (either by link order or be removing the duplicate definition from the sources).&lt;/SPAN&gt;&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, 12 Jul 2024 02:56:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-memory-allocation/m-p/1906707#M18862</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2024-07-12T02:56:21Z</dc:date>
    </item>
  </channel>
</rss>

