<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>when do i need (have to) to use nrf memory manager and when i can use malloc\calloc\free</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63109/when-do-i-need-have-to-to-use-nrf-memory-manager-and-when-i-can-use-malloc-calloc-free</link><description>Hi. 
 I&amp;#39;m using nrf52840 SDK 16 with S140. 
 
 in my last piece of code static arrays were not enough and i needed malloc. 
 I used malloc without any issue, also i use cJSON and it uses malloc as well. again with no issue as far as i can see. However</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Jun 2020 10:03:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63109/when-do-i-need-have-to-to-use-nrf-memory-manager-and-when-i-can-use-malloc-calloc-free" /><item><title>RE: when do i need (have to) to use nrf memory manager and when i can use malloc\calloc\free</title><link>https://devzone.nordicsemi.com/thread/257526?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2020 10:03:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76eb1157-ff92-46c4-ad0a-0bba82aa30c5</guid><dc:creator>Eyal</dc:creator><description>&lt;p&gt;ok, thanks for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: when do i need (have to) to use nrf memory manager and when i can use malloc\calloc\free</title><link>https://devzone.nordicsemi.com/thread/257497?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2020 08:22:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a257345f-cdae-4253-a0cc-c1f8ec13fede</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="Eyal Gal"]So is that the big advantage of the nordic memory manager ? the heap configuration ?[/quote]
&lt;p&gt;&amp;nbsp;Yes, exactly, that is one main advantage of it.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: when do i need (have to) to use nrf memory manager and when i can use malloc\calloc\free</title><link>https://devzone.nordicsemi.com/thread/257445?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2020 16:41:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e931a302-c2fc-4e77-99dc-d59449a69f4a</guid><dc:creator>Eyal</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;My query was more to understand when&amp;nbsp;should i use the nordic memmory manager instead of libc malloc that arrived with the armgcc toolchain (that comes with segger studio). From looking at the sources they do pretty much the same only you have less control of the heap configuration.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So is that the big advantage of the nordic memory manager ? the heap configuration ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: when do i need (have to) to use nrf memory manager and when i can use malloc\calloc\free</title><link>https://devzone.nordicsemi.com/thread/257429?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2020 14:08:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:306253b3-6ce4-4def-881c-f13fd1b23358</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;nRF memory manager was designed to have a memory pool manager for the baremetal solutions which does not have the fancy memory libraries that are in RTOS or any other imported libraries. the malloc available in FreeRTOS should have been enough for you. I am uncertain about the fragmentation benefits of using the nRF memory manager as we have not done side by side benchmarks on this and the one with FreeRTOS.&lt;/p&gt;
&lt;p&gt;I would have tried to understand the hardfaults and its contexts before trying to have a overall conclusion on what is better. FreeRTOS have many different &lt;a href="https://www.freertos.org/a00111.html"&gt;heap &lt;/a&gt;variations that can be used to best suit the application and i would have strongly thought that these variations would be enough and efficient when using freertos as compared to nRF memory manager.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>