<?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 malloc system calls fail in S32 Design Studio in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/malloc-system-calls-fail-in-S32-Design-Studio/m-p/748610#M2580</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;I am unable to make malloc calls in the code. Can you please check it?&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;*************************************************&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;struct&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; color: #005032;"&gt;node&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;char&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; color: #0000c0;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;[5];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;struct&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; color: #005032;"&gt;node&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; *&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #0000c0;"&gt;next&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;}*head;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;struct&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; color: #005032;"&gt;node&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; *&lt;SPAN style="background: silver;"&gt;nptr&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&lt;SPAN style="background: yellow;"&gt;nptr&lt;/SPAN&gt; = &lt;/SPAN&gt;&lt;STRONG style="color: #642880; font-size: 10.0pt;"&gt;malloc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;sizeof&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;struct&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; color: #005032;"&gt;node&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;*************************************************&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When I move mouse tooltip on nptr in above code, I see below warning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*******************&lt;/P&gt;&lt;P&gt;Multiple errors reported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Failed to execute MI command:&lt;/P&gt;&lt;P&gt;-var-create - * nptr&lt;/P&gt;&lt;P&gt;Error message from debugger back end:&lt;/P&gt;&lt;P&gt;value has been optimized out&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Unable to create variable object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Failed to execute MI command:&lt;/P&gt;&lt;P&gt;-var-create - * nptr&lt;/P&gt;&lt;P&gt;Error message from debugger back end:&lt;/P&gt;&lt;P&gt;value has been optimized out&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;*******************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Mohan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Nov 2017 03:57:20 GMT</pubDate>
    <dc:creator>mrajanna</dc:creator>
    <dc:date>2017-11-06T03:57:20Z</dc:date>
    <item>
      <title>malloc system calls fail in S32 Design Studio</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/malloc-system-calls-fail-in-S32-Design-Studio/m-p/748610#M2580</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;I am unable to make malloc calls in the code. Can you please check it?&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;*************************************************&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;struct&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; color: #005032;"&gt;node&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;char&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; color: #0000c0;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;[5];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;struct&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; color: #005032;"&gt;node&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; *&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #0000c0;"&gt;next&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;}*head;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;struct&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; color: #005032;"&gt;node&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; *&lt;SPAN style="background: silver;"&gt;nptr&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&lt;SPAN style="background: yellow;"&gt;nptr&lt;/SPAN&gt; = &lt;/SPAN&gt;&lt;STRONG style="color: #642880; font-size: 10.0pt;"&gt;malloc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;sizeof&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;struct&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; color: #005032;"&gt;node&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;*************************************************&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When I move mouse tooltip on nptr in above code, I see below warning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*******************&lt;/P&gt;&lt;P&gt;Multiple errors reported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Failed to execute MI command:&lt;/P&gt;&lt;P&gt;-var-create - * nptr&lt;/P&gt;&lt;P&gt;Error message from debugger back end:&lt;/P&gt;&lt;P&gt;value has been optimized out&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Unable to create variable object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Failed to execute MI command:&lt;/P&gt;&lt;P&gt;-var-create - * nptr&lt;/P&gt;&lt;P&gt;Error message from debugger back end:&lt;/P&gt;&lt;P&gt;value has been optimized out&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;*******************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Mohan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2017 03:57:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/malloc-system-calls-fail-in-S32-Design-Studio/m-p/748610#M2580</guid>
      <dc:creator>mrajanna</dc:creator>
      <dc:date>2017-11-06T03:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: malloc system calls fail in S32 Design Studio</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/malloc-system-calls-fail-in-S32-Design-Studio/m-p/748611#M2581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mohan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which version of S32 Design Studio you use and which architecture (Power Architecture, ARM...)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please share the whole example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2017 07:19:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/malloc-system-calls-fail-in-S32-Design-Studio/m-p/748611#M2581</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-11-06T07:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: malloc system calls fail in S32 Design Studio</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/malloc-system-calls-fail-in-S32-Design-Studio/m-p/748612#M2582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohan,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is some error with PE Micro debugging. Try to restart S32DS. Did you also include &amp;lt;stdlib.h&amp;gt; header ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway - usage dynamically allocated memory in embedded systems - and especially in automotive industry - is not good practice.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2017 07:47:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/malloc-system-calls-fail-in-S32-Design-Studio/m-p/748612#M2582</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2017-11-06T07:47:47Z</dc:date>
    </item>
  </channel>
</rss>

