<?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>NRF51 removing the HEAP</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9629/nrf51-removing-the-heap</link><description>I would like to remove the HEAP in my app to free up RAM. 
 
 I removed all explict calls to malloc and family. 
 I removed all variable length arrays, after finding that they generated calls to malloc. 
 I set Heap_Size EQU 0; in arm_startup_nrf51</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Nov 2019 21:56:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9629/nrf51-removing-the-heap" /><item><title>RE: NRF51 removing the HEAP</title><link>https://devzone.nordicsemi.com/thread/221946?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 21:56:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb089e3b-a97d-4fae-886b-8dabf1ac273f</guid><dc:creator>Elias</dc:creator><description>&lt;p&gt;For posterity:&lt;br /&gt;If you&amp;#39;re using C99, it turns out that using dynamically-sized arrays declared like &amp;quot;uint8_t my_array[input_size];&amp;quot; gets translated at compile-time to a malloc().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51 removing the HEAP</title><link>https://devzone.nordicsemi.com/thread/35595?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2015 06:26:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baf6001b-3cca-4ca8-bca4-ae7c010e3a89</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The simplest way of removing the HEAP is doing it in your compiler, for Keil this means using the MicroLIB functionality.&lt;/p&gt;
&lt;p&gt;Go to Projects -&amp;gt; Options for Target&lt;/p&gt;
&lt;p&gt;In the Target header check the tickbox for Use MicroLIB&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/use_5F00_microlib.png" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;More tips on reducing RAM usage can be found in &lt;a href="https://devzone.nordicsemi.com/blogs/723/rom-and-ram-management/"&gt;this blog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51 removing the HEAP</title><link>https://devzone.nordicsemi.com/thread/35594?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2015 22:32:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4347e6c7-e564-497c-84c6-b03cb094bdba</guid><dc:creator>Andrew</dc:creator><description>&lt;p&gt;Explicit as in, no variable length arrays.  Basically, as long as nothing calls to malloc() or calloc(), you can zero out the heap size safely.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51 removing the HEAP</title><link>https://devzone.nordicsemi.com/thread/35593?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2015 22:18:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a08fcd3b-a4c5-4f20-bd4e-a147263eb352</guid><dc:creator>ashelly</dc:creator><description>&lt;p&gt;what do you mean &amp;quot;explicitly defined&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51 removing the HEAP</title><link>https://devzone.nordicsemi.com/thread/35592?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2015 21:18:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e94711f5-a567-4ac9-94cf-424c571744dc</guid><dc:creator>Andrew</dc:creator><description>&lt;p&gt;As long as there are no calls to malloc and all variables are explicitly defined you should be OK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>