<?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: problems with malloc () in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146019#M3322</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Hi, Stanish: still not resolved the problems with HEAP. I did several times what you suggested to not avail.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;In file libdefh.h:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;
#define LIBDEF_HEAPSIZE  100&lt;/PRE&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Times New Roman"&gt;In file Project.map appears:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;PRE&gt;
MODULE:                 -- HEAP.C.o (ansiis.lib) --
- PROCEDURES:
     _heapcrash_                                  0'Error      16      22       0   .text      
- VARIABLES:
     _heap_                                       0'Error     7D0    2000       0   HEAP_SEGMENT&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Times New Roman" size="3"&gt;&lt;SPAN&gt;I send attached:&lt;/SPAN&gt;&lt;SPAN&gt;1)project.map (this update at 18-10-09)&lt;/SPAN&gt; &lt;SPAN&gt;2)ansiis.lib (this file not update. I can not open. CW´s message is: &lt;EM&gt;Codewarrior cannot open files of this type&lt;/EM&gt;.)&lt;/SPAN&gt; &lt;SPAN&gt;3)CW screen image.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Times New Roman" size="3"&gt;&lt;SPAN&gt;W&lt;/SPAN&gt;&lt;SPAN&gt;here I continue?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Times New Roman" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CW816COMM/5827_consulta_18_10_09.zip" rel="nofollow noopener noreferrer noopener noreferrer" target="_self"&gt;consulta_18-10-09.zip&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-19&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:24 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 08:47:23 GMT</pubDate>
    <dc:creator>Danielito</dc:creator>
    <dc:date>2020-10-29T08:47:23Z</dc:date>
    <item>
      <title>problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146010#M3313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN class="Apple-style-span"&gt;&lt;SPAN class="Apple-style-span"&gt;I have a MC9S09QG8 and the problem is that I get a message when working with malloc (): L1102: Out of allocation space in segment RAM at address 0x10C. There are solutions on how to modify file libdefs.h as LIBDEF_HEAPSIZE but does not work.&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;I know it's an MCU ¨ small but deserie create a small buffer with dynamic memory and not let me. Any suggestion is welcome&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;thanks&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2009 05:19:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146010#M3313</guid>
      <dc:creator>Danielito</dc:creator>
      <dc:date>2009-10-10T05:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146011#M3314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Danielito,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The default heap size (2000 Bytes) is probably too big for this MCU. Reduce the heap size (&lt;SPAN class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12px"&gt;LIBDEF_HEAPSIZE)&amp;nbsp;&lt;SPAN class="Apple-style-span" style="font-family: Verdana; font-size: 13px"&gt;in&lt;SPAN class="Apple-style-span" style="font-size: 12px"&gt;&lt;FONT class="Apple-style-span" face="'courier new', courier"&gt;&amp;nbsp;l&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN class="Apple-style-span" style="font-size: 12px"&gt;&lt;FONT class="Apple-style-span" face="'courier new', courier"&gt;ibdefs.h&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN class="Apple-style-span" style="font-size: 12px"&gt;&lt;FONT class="Apple-style-span" face="'courier new', courier"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN class="Apple-style-span" style="font-size: 12px"&gt;&lt;FONT class="Apple-style-span" face="arial, helvetica, sans-serif"&gt;and rebuild the library.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then you shold be able to allocate heap in RAM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See also&amp;nbsp;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CW816COMM&amp;amp;message.id=1628&amp;amp;query.id=80463#M1628" target="_self"&gt;this&lt;/A&gt;&amp;nbsp;thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stanish&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 15:43:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146011#M3314</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2009-10-12T15:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146012#M3315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="Apple-style-span"&gt;Hi Stanish:&amp;nbsp;I tried without success. I send the file PWM4 where the function insert () in MCUinit.c. The problem occurs when you enable the allocation nuevo=(pNodo)malloc(sizeof (NODETYPE));&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN class="Apple-style-span"&gt;any suggestion is welcome&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN class="Apple-style-span"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CW816COMM/5810_PWM4.zip" rel="nofollow" target="_self"&gt;PWM4.zip&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-13&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:21 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 22:17:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146012#M3315</guid>
      <dc:creator>Danielito</dc:creator>
      <dc:date>2009-10-12T22:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146013#M3316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Danielito,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems in your case the problem is caused by the fact you've splitted the RAM into two seqments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
SEGMENTS      Z_RAM =  READ_WRITE   0x0060 TO 0x00FF;   
 &lt;SPAN class="Apple-tab-span" style="white-space: pre"&gt;&lt;/SPAN&gt; RAM =  READ_WRITE   0x0100 TO 0x015F;
    &lt;SPAN class="Apple-tab-span" style="white-space: pre"&gt;&lt;/SPAN&gt;       RAM2 =  READ_WRITE   0x0160 TO 0x025F;  
...
PLACEMENT
  DEFAULT_RAM               INTO  RAM;
  DINAMICA,                 INTO  RAM2;       &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RAM &amp;nbsp;size &amp;nbsp;-&amp;gt; 96 Bytes&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RAM2 size -&amp;gt; 256 Bytes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since Stack and Heap are both placed into DEFAULT_RAM by default there is not enough space.&lt;/P&gt;&lt;P&gt;According to the .prm file stack size is set to 0x50 = 80 Bytes -&amp;gt; there are remaining 16 bytes for variables + Heap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd suggest you to set bigger "RAM" memory segment plus you can allocate heap into RAM2:&lt;/P&gt;&lt;PRE style="font-family: Courier; font-size: 10px; background-color: #f0f0f0; color: #000000; overflow-x: scroll; overflow-y: scroll; white-space: pre-wrap; word-wrap: break-word; border-width: 1px; border-color: #000000; border-style: dashed; padding: 3px; margin: 10px"&gt;
PLACEMENT
  DEFAULT_RAM               INTO  RAM;
  DINAMICA,HEAP_SEGMENT     INTO  RAM2;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stanish&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by stanish on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-13&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;02:49 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:47:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146013#M3316</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2020-10-29T08:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146014#M3317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stanish: i do&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
RAM                      =  READ_WRITE   0x0100 TO 0x024F;RAM2                     =  READ_WRITE   0x0250 TO 0x025F;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;and the problems continue.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN class="apple-style-span"&gt;&lt;SPAN&gt;whit variable “nuevo” &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;assigned whit malloc() in MCUinit.c&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-style-span"&gt;in projec.map appears:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
.bss                              12   R/W      0x100      0x10B   RAM&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN class="Apple-style-span"&gt;and the error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
Link Error   : L1102: Out of allocation space in segment RAM at address 0x10C&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;no&lt;SPAN class="apple-style-span"&gt;&lt;SPAN&gt;&amp;nbsp;variable “nuevo”assigned in MCUinit.c&lt;/SPAN&gt;&lt;/SPAN&gt;:&lt;/P&gt;&lt;P class="MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
.bss                               8   R/W      0x100      0x107   RAM.common                            6   R/W      0x108      0x10D   RAM.stack                            80   R/W      0x10E      0x15D   RAM&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;and not problems in RAM.&lt;/P&gt;&lt;P&gt;What can i do?&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;thank you&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:47:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146014#M3317</guid>
      <dc:creator>Danielito</dc:creator>
      <dc:date>2020-10-29T08:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146015#M3318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Danielito,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've used your project (see .prm below) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
SEGMENTS ...    RAM  =  READ_WRITE   0x0100 TO 0x024F;        RAM2 =  READ_WRITE   0x0250 TO 0x025F;...PLACEMENT   DEFAULT_RAM  INTO  RAM;   DINAMICA     INTO  RAM2;        ...
STACKSIZE 0x50&lt;/PRE&gt;&lt;P&gt;stacksize: &amp;nbsp;80 Bytes&lt;/P&gt;&lt;P&gt;heap size: 80 Bytes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I can link the app. without any linker error. See the snippet from the map file below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
*********************************************************************************************SECTION-ALLOCATION SECTIONSection Name                    Size  Type     From       To       Segment---------------------------------------------------------------------------------------------DINAMICA                           1   R/W      0x250      0x250   RAM2....bss                              12   R/W      0x100      0x10B   RAMHEAP_SEGMENT                      80   R/W      0x10C      0x15B   RAM.common                            8   R/W      0x15C      0x163   RAM.stack                            80   R/W      0x164      0x1B3   RAM.... nuevo                                      162       2       2       1   .common    &lt;/PRE&gt;&lt;P&gt;Stanish&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:47:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146015#M3318</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2020-10-29T08:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146016#M3319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stanish: because I still have problems sending you 3 file: 1) Project(whitout nuevo).map: this file does not assign the variable nuevo within MCUinit.c when I compile with my CW (whitout problems in the segmentation) 2) Project(with nuevo).map: : this file assign the variable nuevo within MCUinit.c when I compile with my CW (with problems in the segmentation) 3) PWM4.mcp whitout the variable nuevo assigned within MCUinit.c and the changes in the file .prm we observe. If you can compiler PWM4 with your compiler and have no problems, them problems may be in the configuration of the heap in the my CW compiler or the problems is in the compiler of CW..., because if you see the file Project(whitout nuevo), errors appears in several sections relating to HEAP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CW816COMM/5817_consulta15_10_09.zip" rel="nofollow" target="_self"&gt;consulta15-10-09.zip&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-16&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;09:52 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 01:38:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146016#M3319</guid>
      <dc:creator>Danielito</dc:creator>
      <dc:date>2009-10-16T01:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146017#M3320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Danielito,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think it's a compiler issue.&lt;/P&gt;&lt;P&gt;I suspect you haven't rebuilt ansi libraries or didn't modify heap size properly. Your "libbdef.h" and "ansiis.lib" are not included in .zip file so i cannot check it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But according to "project(with nuevo).map" heap size is still 2000 Bytes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
MODULE: -- HEAP.C.o (ansiis.lib) ---
PROCEDURES:
_heapcrash_  0'Error      16      22       0   .text      
VARIABLES:    
_heap_   0'Error     7D0    2000       0   HEAP_SEGMENT&lt;/PRE&gt;&lt;P&gt;I'd suggest you to double check if&amp;nbsp;&lt;SPAN class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12px; line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px"&gt;LIBDEF_HEAPSIZE (&lt;SPAN class="Apple-style-span" style="font-family: Verdana; font-size: 13px"&gt;&lt;SPAN class="Apple-style-span" style="font-size: 12px"&gt;&lt;FONT class="Apple-style-span" face="'courier new', courier"&gt;l&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN class="Apple-style-span" style="font-size: 12px"&gt;&lt;FONT class="Apple-style-span" face="'courier new', courier"&gt;ibdefs.h&lt;SPAN class="Apple-style-span" style="font-family: arial, sans-serif"&gt;) is reduced to fit &amp;nbsp;S08QG8 RAM (e.g 80 Bytes)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and Rebuild the Libraries project which update all the ansi*.lib (files). In your case you are using "ansiis.lib" so the&amp;nbsp;cration date of this file should change after rebuid.&lt;/P&gt;&lt;P&gt;Follow&amp;nbsp;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CW816COMM&amp;amp;message.id=1628&amp;amp;query.id=80463#M1628" rel="nofollow noopener noreferrer noopener noreferrer" target="_self"&gt;these instructions&lt;/A&gt;&amp;nbsp;to rebuild your library correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stanish&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by stanish on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-16&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;09:59 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:47:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146017#M3320</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2020-10-29T08:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146018#M3321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Since dynamic allocation is unsuitable in embedded systems in general, and in 8-bit apps in particular, trying to introduce a bombastic heap in a tiny 8-bit, 8k micro ultimately sounds like poor design... what exactly are you trying to achieve here?&lt;BR /&gt;&lt;BR /&gt;You will still have to reserve heap size for the worst scenario, so you save no memory whatsoever with a heap. The heap will however invite the possibility of memory leaks.&lt;BR /&gt;&lt;BR /&gt;Why not simply allocate a static array and be done with it? In this plain static array you can implement a ring buffer, or a fixed max size linked list, or whatever such ADT your app needs. Much more efficient and safe.&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 17:26:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146018#M3321</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2009-10-16T17:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146019#M3322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Hi, Stanish: still not resolved the problems with HEAP. I did several times what you suggested to not avail.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;In file libdefh.h:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;
#define LIBDEF_HEAPSIZE  100&lt;/PRE&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Times New Roman"&gt;In file Project.map appears:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;PRE&gt;
MODULE:                 -- HEAP.C.o (ansiis.lib) --
- PROCEDURES:
     _heapcrash_                                  0'Error      16      22       0   .text      
- VARIABLES:
     _heap_                                       0'Error     7D0    2000       0   HEAP_SEGMENT&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Times New Roman" size="3"&gt;&lt;SPAN&gt;I send attached:&lt;/SPAN&gt;&lt;SPAN&gt;1)project.map (this update at 18-10-09)&lt;/SPAN&gt; &lt;SPAN&gt;2)ansiis.lib (this file not update. I can not open. CW´s message is: &lt;EM&gt;Codewarrior cannot open files of this type&lt;/EM&gt;.)&lt;/SPAN&gt; &lt;SPAN&gt;3)CW screen image.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Times New Roman" size="3"&gt;&lt;SPAN&gt;W&lt;/SPAN&gt;&lt;SPAN&gt;here I continue?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Times New Roman" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CW816COMM/5827_consulta_18_10_09.zip" rel="nofollow noopener noreferrer noopener noreferrer" target="_self"&gt;consulta_18-10-09.zip&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-19&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:24 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:47:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146019#M3322</guid>
      <dc:creator>Danielito</dc:creator>
      <dc:date>2020-10-29T08:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146020#M3323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't rebuilt the library. Changing LBDEF_xx is not enough. To rebuild the library, you should open library project file and make it. This should rebuild all libraries. To rebuild just ansiis.lib, change target combo box from all libraries to "C no float HCS08", then make.&lt;/P&gt;&lt;P&gt;Default library project file path is this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"c:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.2\lib\hc08c\hc08_lib.mcp"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 14:30:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146020#M3323</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2009-10-19T14:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146021#M3324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what&amp;nbsp;I needed was to know how a library is rebuilt. Thanks to your messages and reference ppoi (FAQ 3404) succeeded. I wonder now how llibrary was built from a source file.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-style-span"&gt;&lt;SPAN class="Apple-style-span"&gt;Thanks Kef and Stanish&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 20:18:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146021#M3324</guid>
      <dc:creator>Danielito</dc:creator>
      <dc:date>2009-10-20T20:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146022#M3325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="Apple-style-span"&gt;Hi Stanish: the problem was that I not pressed F7 to rebuild the *. lib hc08_lib.mcp project. Now, I wonder if there is a FAQ of the forum can guide me in the reconstruction or construction of library files from source files.&amp;nbsp;&lt;BR /&gt;Thanks for your guidance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Danielito&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 21:36:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146022#M3325</guid>
      <dc:creator>Danielito</dc:creator>
      <dc:date>2009-10-21T21:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: problems with malloc ()</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146023#M3326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Danielito,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check the FAQ below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-style-span" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: normal; font-weight: bold; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px"&gt;&lt;SPAN class="Apple-style-span" style="font-family: Verdana; font-size: 13px; font-weight: normal; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; line-height: 15px"&gt;&lt;A href="http://www.freescale.com/webapp/sps/utils/SingleFaq.jsp?FAQ-27441.xml" rel="nofollow" target="_self"&gt;FAQ-27441&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class="Apple-style-span" style="font-weight: normal; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px"&gt;Can I use malloc in CodeWarrior for HC(S)08?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stanish&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 18:59:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/problems-with-malloc/m-p/146023#M3326</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2009-10-23T18:59:44Z</dc:date>
    </item>
  </channel>
</rss>

