<?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: System crash with the function Malloc in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662646#M8772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello gaojian xu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i agree with &lt;A _jive_internal="true" class="" data-avatarid="1002" data-externalid="" data-online="false" data-presence="null" data-userid="15013" data-username="ZhangJennie" href="https://community.nxp.com/people/ZhangJennie"&gt;ZhangJennie&lt;/A&gt;.&amp;nbsp; Can you create demo code and share? Chance to find problem will increase....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Harsh&lt;/P&gt;&lt;P&gt;Einfochips INDIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Nov 2016 12:12:32 GMT</pubDate>
    <dc:creator>harshpatel</dc:creator>
    <dc:date>2016-11-18T12:12:32Z</dc:date>
    <item>
      <title>System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662638#M8764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I transplanted some old source code ran on K10 to Kv31 (KV31F512M12). The IDE is&amp;nbsp;&lt;A _jive_internal="true" class="jivecontainerTT-hover-container jive-link-community-small" data-containerid="2019" data-containertype="14" data-objectid="11213" data-objecttype="14" href="https://community.nxp.com/community/kinetis/kinetis-design-studio" style="border: 0px currentColor; color: #5e89c1; font-size: 14px; background-color: #ffffff;"&gt;Kinetis Design Studio&lt;/A&gt;&amp;nbsp;3.2.0.&lt;/P&gt;&lt;P&gt;The debug interface is GDB PEMicro.&amp;nbsp;The compilation and download is ok. But in the debug mode, the system crash and enter into &lt;STRONG&gt;DefaultISR&lt;/STRONG&gt; every time the system enconter the function &lt;STRONG&gt;malloc.&amp;nbsp;&lt;/STRONG&gt;As below:&lt;/P&gt;&lt;P&gt;Excute this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;This = (struct evt_queue_ty *)malloc(sizeof(struct evt_queue_ty) + size*sizeof(struct evt_event_ty));&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Crash and jump to：&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DefaultISR:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; b DefaultISR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; .size DefaultISR, . - DefaultISR&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;What's wrong? Is it failed with source code or IDE configuration?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 02:57:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662638#M8764</guid>
      <dc:creator>gaojianxu</dc:creator>
      <dc:date>2016-11-16T02:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662639#M8765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" class="" data-userid="290592" data-username="gaojianxu" href="https://community.nxp.com/people/gaojianxu"&gt;gaojian xu&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share your source code? So i can look into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Harsh&lt;/P&gt;&lt;P&gt;Enginner&lt;/P&gt;&lt;P&gt;Einfochips, INDIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 09:12:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662639#M8765</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2016-11-16T09:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662640#M8766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the compiler optimization set to -Os for 'Small'?&lt;/P&gt;&lt;P&gt;If the problem goes away with '-O2' it is crashing due to alignment issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 13:28:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662640#M8766</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-11-16T13:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662641#M8767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Harsh&lt;/P&gt;&lt;P&gt;I can't share all the project source code with you. It is a large project with so many source code files and also limited by my company policy. I post the function where it crashes. Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;typedef struct evt_event_ty&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;EVT_CONTENT&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;} t_event;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// The Event Queue object type:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;typedef struct evt_queue_ty&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;t_event&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*evt_buffer;&amp;nbsp;// the address of the event buffer&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;word&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;evtqsize;&amp;nbsp;&amp;nbsp;// and size of it.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;word&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;evt_head;&amp;nbsp;&amp;nbsp;// event head -index (keep it word!)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;t_event&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*pevt_tail;&amp;nbsp;&amp;nbsp;// event tail -pointer&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;word&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;evt_cnt;&amp;nbsp;&amp;nbsp;// counts events in the queue&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;word&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;max_evt_cnt;&amp;nbsp;// max used event queue size&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;word&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lost_events;&amp;nbsp;// events lost -counter&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;struct evt_queue_ty&amp;nbsp;*next;&amp;nbsp;&amp;nbsp;&amp;nbsp;// next evtQueue in chain&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;} evtQueue;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;pevtQueue evtCreateEventQueue(unsigned int size)&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;evtQueue&amp;nbsp;*This;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;evtQueue&amp;nbsp;*Chain;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;This = (evtQueue*)malloc(sizeof(evtQueue) + size*sizeof(t_event));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;if (This != NULL)&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;{&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;This-&amp;gt;evt_buffer = (t_event*)(This+1);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;/* preset instance: */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;This-&amp;gt;evt_head = 0;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;This-&amp;gt;pevt_tail = This-&amp;gt;evt_buffer;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;This-&amp;gt;evt_cnt = 0;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;This-&amp;gt;max_evt_cnt = 0;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;This-&amp;gt;lost_events = 0;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;This-&amp;gt;next = NULL;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;This-&amp;gt;evtqsize = size;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;if (evtFirstQ == NULL)&amp;nbsp;&amp;nbsp;&amp;nbsp;/* the first time ? (..is the best? HUH!) */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;{&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;kernServiceReg(&amp;amp;evtPump);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* preset static variables: */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;curEvent = NULL;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* no events under progress */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;evtFirstQ = This;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* and This is the first queue in chain */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;}&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;else&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;for (Chain=evtFirstQ; ; Chain=Chain-&amp;gt;next)&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;{&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* chain the queue: */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (Chain-&amp;gt;next == NULL)&amp;nbsp;/* if the end-of-chain found */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (evtFirstQ == NULL)&amp;nbsp;/* if there's no chain yet, */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;evtFirstQ = This;&amp;nbsp;/* then start it by This. */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Otherwise */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Chain-&amp;gt;next = This;&amp;nbsp;/* set This to the end of the chain. */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* a faster way out, than next loop... */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;}&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;}&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;K2_ASSERT(This != NULL);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;return This;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* ok, give the pointer to the created queue */&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 01:36:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662641#M8767</guid>
      <dc:creator>gaojianxu</dc:creator>
      <dc:date>2016-11-17T01:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662642#M8768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the problem is not because of optimization, I suggest you create a demo project to showcase your problem. &lt;/P&gt;&lt;P&gt;This problem is easier to be investigated with reproduction, but hard if not.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 03:09:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662642#M8768</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2016-11-17T03:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662643#M8769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The optimization set is -O0 and I changed it to -O2 but the problem do not disapear.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 03:41:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662643#M8769</guid>
      <dc:creator>gaojianxu</dc:creator>
      <dc:date>2016-11-17T03:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662644#M8770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only -Os has the alignment issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-O0 generates really inefficient code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there enough memory available for malloc to work?&lt;BR /&gt;Depending on the implementation it may fault rather than return NULL.&lt;/P&gt;&lt;P&gt;Is the linker script setup proper ally to have a heap that is large enough?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;EM style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 14px;"&gt;This-&amp;gt;evt_buffer = (t_event*)(This+1);"&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;The +1 to the pointer This does not give me the warm fuzzies even with the cast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 12:48:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662644#M8770</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-11-17T12:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662645#M8771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The heap set as:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x4000;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x1000;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0800 : 0x0000;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* Specify the memory areas */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;MEMORY&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00008000&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00010000&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 02:55:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662645#M8771</guid>
      <dc:creator>gaojianxu</dc:creator>
      <dc:date>2016-11-18T02:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662646#M8772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello gaojian xu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i agree with &lt;A _jive_internal="true" class="" data-avatarid="1002" data-externalid="" data-online="false" data-presence="null" data-userid="15013" data-username="ZhangJennie" href="https://community.nxp.com/people/ZhangJennie"&gt;ZhangJennie&lt;/A&gt;.&amp;nbsp; Can you create demo code and share? Chance to find problem will increase....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Harsh&lt;/P&gt;&lt;P&gt;Einfochips INDIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 12:12:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662646#M8772</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2016-11-18T12:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662647#M8773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't tell from that were the heap is located nor the actual heap size.&lt;BR /&gt;If __heap_size__ is defined earlier than the line shown then that value will be used, not the 0x4000 (half of the m_data space) value shown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a normal linker script everything will use m_data by default.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 13:21:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662647#M8773</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-11-18T13:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662648#M8774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I try to build a demo code and share. But when I tailor the source code to a minimal project which keep the malloc and the project conifgurations. The function call of malloc sucess and the crash disappear.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 09:13:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662648#M8774</guid>
      <dc:creator>gaojianxu</dc:creator>
      <dc:date>2016-11-21T09:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662649#M8775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great...!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If in future still found issue than share a demo code. We have faced such isseue so we may help to solve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Harsh&lt;/P&gt;&lt;P&gt;Einfochips INDIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 10:46:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662649#M8775</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2016-11-21T10:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: System crash with the function Malloc</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662650#M8776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the real code I'd check for a collision between the Heap and the Stack.&lt;BR /&gt;Demo project probably uses less of both, so they don't collide.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A class="link-titled" href="http://embeddedgurus.com/state-space/2014/02/are-we-shooting-ourselves-in-the-foot-with-stack-overflow/" title="http://embeddedgurus.com/state-space/2014/02/are-we-shooting-ourselves-in-the-foot-with-stack-overflow/"&gt;Are We Shooting Ourselves in the Foot with Stack Overflow? « State Space&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuoneclipse.com/2015/08/21/gnu-static-stack-usage-analysis/" title="https://mcuoneclipse.com/2015/08/21/gnu-static-stack-usage-analysis/"&gt;GNU Static Stack Usage Analysis | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 13:17:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/System-crash-with-the-function-Malloc/m-p/662650#M8776</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-11-21T13:17:15Z</dc:date>
    </item>
  </channel>
</rss>

