<?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 What's the best way to redefine malloc Et Al. functions for FreeRTOS ?  in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/What-s-the-best-way-to-redefine-malloc-Et-Al-functions-for/m-p/1040743#M3322</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;We have C++ projects, using Newlib, and noticed that internal functions of newlib (like &lt;EM&gt;printf()&lt;/EM&gt; ) call malloc (and other functions of the same family like malloc_r, etc.).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is problematic for many reasons that are obvious and I'm not going to list here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We would like to redefine all memory allocation function to use FreeRTOS memory allocation function like&amp;nbsp;pvPortMalloc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an exhaustive list of functions that need to be re-implemented and example implemnetation for FreeRTOS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or should i just do it myself and reeimplement all &lt;A href="https://sourceware.org/newlib/libc.html#malloc"&gt;these&lt;/A&gt; functions ? (although I'm not sure i fully understand all of them, like malloc_r() for example)&lt;BR /&gt;&lt;BR /&gt;I feel like it's a known problem, and i wouldn't want to reinvent the wheel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice would be greatly apreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jul 2020 08:47:52 GMT</pubDate>
    <dc:creator>i_kamal</dc:creator>
    <dc:date>2020-07-30T08:47:52Z</dc:date>
    <item>
      <title>What's the best way to redefine malloc Et Al. functions for FreeRTOS ?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/What-s-the-best-way-to-redefine-malloc-Et-Al-functions-for/m-p/1040743#M3322</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;We have C++ projects, using Newlib, and noticed that internal functions of newlib (like &lt;EM&gt;printf()&lt;/EM&gt; ) call malloc (and other functions of the same family like malloc_r, etc.).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is problematic for many reasons that are obvious and I'm not going to list here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We would like to redefine all memory allocation function to use FreeRTOS memory allocation function like&amp;nbsp;pvPortMalloc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an exhaustive list of functions that need to be re-implemented and example implemnetation for FreeRTOS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or should i just do it myself and reeimplement all &lt;A href="https://sourceware.org/newlib/libc.html#malloc"&gt;these&lt;/A&gt; functions ? (although I'm not sure i fully understand all of them, like malloc_r() for example)&lt;BR /&gt;&lt;BR /&gt;I feel like it's a known problem, and i wouldn't want to reinvent the wheel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice would be greatly apreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2020 08:47:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/What-s-the-best-way-to-redefine-malloc-Et-Al-functions-for/m-p/1040743#M3322</guid>
      <dc:creator>i_kamal</dc:creator>
      <dc:date>2020-07-30T08:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to redefine malloc Et Al. functions for FreeRTOS ?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/What-s-the-best-way-to-redefine-malloc-Et-Al-functions-for/m-p/1040744#M3323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I recommend you have a look at&amp;nbsp;&lt;A class="link-titled" href="http://www.nadler.com/embedded/newlibAndFreeRTOS.html" title="http://www.nadler.com/embedded/newlibAndFreeRTOS.html"&gt;newlib and FreeRTOS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;A class="link-titled" href="https://mcuoneclipse.com/2017/07/02/using-freertos-with-newlib-and-newlib-nano/" title="https://mcuoneclipse.com/2017/07/02/using-freertos-with-newlib-and-newlib-nano/"&gt;Using FreeRTOS with newlib and newlib-nano | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check out as well the latest SDK v2.8 which includes that heap_useNewlib.c too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2020 17:25:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/What-s-the-best-way-to-redefine-malloc-Et-Al-functions-for/m-p/1040744#M3323</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2020-07-30T17:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to redefine malloc Et Al. functions for FreeRTOS ?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/What-s-the-best-way-to-redefine-malloc-Et-Al-functions-for/m-p/1040745#M3324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&amp;nbsp;Erich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's interesting.&amp;nbsp; I'll have look, do some tests and share my results :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2020 17:30:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/What-s-the-best-way-to-redefine-malloc-Et-Al-functions-for/m-p/1040745#M3324</guid>
      <dc:creator>i_kamal</dc:creator>
      <dc:date>2020-07-30T17:30:14Z</dc:date>
    </item>
  </channel>
</rss>

