<?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>8-bit MicrocontrollersのトピックDynamic Memory Allocation on the HC08?</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Dynamic-Memory-Allocation-on-the-HC08/m-p/132177#M2953</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm using the GP32 and the CodeWarrior IDE, programming in C.&amp;nbsp; I know this device doesn't have all that much RAM (512 bytes), but I was hoping to use malloc() instead of a global variable for some small string parsing.&amp;nbsp; When I compile, I get an error that says, "Out of allocation space in segment RAM at address 0x104".&amp;nbsp; Using malloc() is no problem on devices that have more memory.&amp;nbsp;&amp;nbsp;Just to confirm, I&amp;nbsp;increased the RAM size in the .prm file&amp;nbsp;and then the error&amp;nbsp;went away. &amp;nbsp;It seems that CodeWarrior wants to allocate more RAM for the heap than the GP32 device even has.&amp;nbsp; Somewhere, there has to be a place that I can reduce the heap size, but I'm not finding it.&amp;nbsp; Has anyone done this before?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Apr 2006 22:54:31 GMT</pubDate>
    <dc:creator>rhinoceroshead</dc:creator>
    <dc:date>2006-04-11T22:54:31Z</dc:date>
    <item>
      <title>Dynamic Memory Allocation on the HC08?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Dynamic-Memory-Allocation-on-the-HC08/m-p/132177#M2953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm using the GP32 and the CodeWarrior IDE, programming in C.&amp;nbsp; I know this device doesn't have all that much RAM (512 bytes), but I was hoping to use malloc() instead of a global variable for some small string parsing.&amp;nbsp; When I compile, I get an error that says, "Out of allocation space in segment RAM at address 0x104".&amp;nbsp; Using malloc() is no problem on devices that have more memory.&amp;nbsp;&amp;nbsp;Just to confirm, I&amp;nbsp;increased the RAM size in the .prm file&amp;nbsp;and then the error&amp;nbsp;went away. &amp;nbsp;It seems that CodeWarrior wants to allocate more RAM for the heap than the GP32 device even has.&amp;nbsp; Somewhere, there has to be a place that I can reduce the heap size, but I'm not finding it.&amp;nbsp; Has anyone done this before?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 22:54:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Dynamic-Memory-Allocation-on-the-HC08/m-p/132177#M2953</guid>
      <dc:creator>rhinoceroshead</dc:creator>
      <dc:date>2006-04-11T22:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Memory Allocation on the HC08?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Dynamic-Memory-Allocation-on-the-HC08/m-p/132178#M2954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;First note I would not recommend using dynamic memory allocation at all in a&amp;nbsp; HC08 project, due to the limited amount of memory available.&lt;/P&gt;&lt;P&gt;Beside that, the default heap size is defined as 2000 bytes.&lt;BR /&gt;If you really want to use dynamic data allocation and wants to use a smaller heap:&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Open file libdefs.h in a text editor&lt;BR /&gt;&amp;nbsp;- Change LIBDEF_HEAPSIZE to a smaller value&lt;BR /&gt;&amp;nbsp;- Rebuild the library&amp;nbsp;&lt;/P&gt;&lt;P&gt;But once again I would not recommend using dynamic memory allocation in HC08 application.&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2006 16:13:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Dynamic-Memory-Allocation-on-the-HC08/m-p/132178#M2954</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-04-12T16:13:08Z</dc:date>
    </item>
  </channel>
</rss>

