<?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>How to allocate 4k buffer in RAM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/677/how-to-allocate-4k-buffer-in-ram</link><description>Hi , 
 I am using PCA10001 board. 
 Now i want create 4k buffer in RAM. Which is good way allocate memory to 4k buffer. 
 Can i use dynamic(malloc function) or static memory allocation. 
 in my case code is also larger. 
 Regards
Balaji</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Oct 2013 14:17:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/677/how-to-allocate-4k-buffer-in-ram" /><item><title>RE: How to allocate 4k buffer in RAM</title><link>https://devzone.nordicsemi.com/thread/3417?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2013 14:17:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d977392-df18-416f-9a5b-b3fd63a0a76f</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;If you need to keep data when the device is powered off, you have to write the data to flash. This has been covered quite extensively here on Developer Zone previously, so I&amp;#39;d recommend you to search around a little and have a look. Basically, you have to use the radio notification feature to avoid writing to flash when the softdevice needs to run the CPU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to allocate 4k buffer in RAM</title><link>https://devzone.nordicsemi.com/thread/3416?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2013 12:10:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16bab7df-fa65-404e-847d-52bfc5505526</guid><dc:creator>balaji</dc:creator><description>&lt;p&gt;I have some variables , and there contents should not delete even though&lt;/p&gt;
&lt;p&gt;device is switched off. Can you say how can i achieve this .&lt;/p&gt;
&lt;p&gt;Kindly give some examples.&lt;/p&gt;
&lt;p&gt;Regards
Balaji&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to allocate 4k buffer in RAM</title><link>https://devzone.nordicsemi.com/thread/3415?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2013 08:48:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8e8a51a-e3b7-4909-adb2-575308577f4d</guid><dc:creator>Carles</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;Now i want create 4k buffer in RAM. Which is good way allocate memory to 4k buffer.&lt;/p&gt;
&lt;p&gt;Can i use dynamic(malloc function) or static memory allocation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The SDK does not uses dynamic memory allocation, so if you wanted to use that you&amp;#39;d have to implement your own memory management scheme.&lt;/p&gt;
&lt;p&gt;If you have enough room, you can simply statically define your buffer, but 4KB sounds a bit excessive.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>