<?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 Re: Disable Heap in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disable-Heap/m-p/387223#M11447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello twp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should be enough to remove/comment out the heap memory section from .lcf:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//heap: org = 0x40014000, len = 0x00008000 /* 32K heap core_lsm */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also linker expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//_heap_addr&amp;nbsp; = ADDR(heap);&lt;/P&gt;&lt;P&gt;//_heap_end&amp;nbsp;&amp;nbsp; = ADDR(heap)+SIZEOF(heap);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The linker generates some heap symbols anyway (see the .map file):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_heap_addr 003d7ff0&lt;/P&gt;&lt;P&gt;_heap_end 003d7ff0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but these symbols are equal so the size of heap memory pool is 0. Any attemp to allocate memory using malloc() will not allocate any memory and return 0. You are save and you don't overwrite anything in your SRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2014 16:34:23 GMT</pubDate>
    <dc:creator>stanish</dc:creator>
    <dc:date>2014-11-11T16:34:23Z</dc:date>
    <item>
      <title>Disable Heap</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disable-Heap/m-p/387222#M11446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using the standard linker file for the MPC5643L flash build "MPC5643L_FLASH.lcf" on a product that is required &lt;SPAN style="text-decoration: underline;"&gt;not&lt;/SPAN&gt; to use dynamic memory allocation.&amp;nbsp; What is the best way to disable the heap?&amp;nbsp; Removing it from the .lcf file still leaves symbols in the map file. Alternatively, changing the size in the project settings C/C++ Build -&amp;gt; Settings -&amp;gt; PowerPC Linker -&amp;gt; Output, to 0K doesn't seem to have any effect.&amp;nbsp; Is there a safe way to go about this and disable dynamic allocation library functions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2014 16:49:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disable-Heap/m-p/387222#M11446</guid>
      <dc:creator>twp</dc:creator>
      <dc:date>2014-11-07T16:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Heap</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disable-Heap/m-p/387223#M11447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello twp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should be enough to remove/comment out the heap memory section from .lcf:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//heap: org = 0x40014000, len = 0x00008000 /* 32K heap core_lsm */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also linker expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//_heap_addr&amp;nbsp; = ADDR(heap);&lt;/P&gt;&lt;P&gt;//_heap_end&amp;nbsp;&amp;nbsp; = ADDR(heap)+SIZEOF(heap);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The linker generates some heap symbols anyway (see the .map file):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_heap_addr 003d7ff0&lt;/P&gt;&lt;P&gt;_heap_end 003d7ff0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but these symbols are equal so the size of heap memory pool is 0. Any attemp to allocate memory using malloc() will not allocate any memory and return 0. You are save and you don't overwrite anything in your SRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 16:34:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disable-Heap/m-p/387223#M11447</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2014-11-11T16:34:23Z</dc:date>
    </item>
  </channel>
</rss>

