<?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>What is Block memory allocator ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82033/what-is-block-memory-allocator</link><description>Hi All, 
 Now i&amp;#39;m using peripheral - blinky project,and i saw the Block allocator module in the sdk_config.h. 
 Can anyone tell me what is the Block allocator module use for? 
 
 Best regards, 
 Kai</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Nov 2021 12:04:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82033/what-is-block-memory-allocator" /><item><title>RE: What is Block memory allocator ?</title><link>https://devzone.nordicsemi.com/thread/341260?ContentTypeID=1</link><pubDate>Tue, 30 Nov 2021 12:04:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:602e4983-5da9-4126-8722-691bfb172d6d</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Kai,&lt;/p&gt;
&lt;p&gt;You are welcome.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is Block memory allocator ?</title><link>https://devzone.nordicsemi.com/thread/340811?ContentTypeID=1</link><pubDate>Fri, 26 Nov 2021 00:22:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31c038c2-da98-4732-84a2-2bfa62287e5c</guid><dc:creator>kai19960504</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Sultana,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I got it,thank you very much!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kai&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is Block memory allocator ?</title><link>https://devzone.nordicsemi.com/thread/340779?ContentTypeID=1</link><pubDate>Thu, 25 Nov 2021 15:03:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1b917fb-7b64-4e54-b1aa-8e7f8edf3cce</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello kai,&lt;/p&gt;
&lt;p&gt;I meant this block allocator is a module which enables dynamic memory allocation. We do not have any teaching film. I am trying to explaining you -&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Say, there is a task of filling up an allocation request which consists locating a block of unused memory of sufficient&amp;nbsp;size. Memory requests are satisfied by allocating portions from a large memory pool called the heap or free store (The heap is&amp;nbsp;&lt;b&gt;an area of RAM that represents the dynamic memory of the system&lt;/b&gt;. When one module does not need its allocated memory anymore, the developer should return it to the memory allocator&amp;nbsp;so that it could be reused by some other module.)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For example: in the below figure we can see that there are 6 blocks of free memory available in first row.&amp;nbsp; In the second row, A B and C blocks are dynamically allocated. In the 3rd row we can see that the middle block is released or freed and other two memory blocks are used still. If any new module needs a free block as same size of B then it can be used by that otherwise it would be free.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1637848032000v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here is the link of block allocator libraries used in nRF5 SDK&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_balloc.html&amp;amp;cp=8_5_4_3_4"&gt;Nordic Semiconductor Infocenter&lt;/a&gt;&amp;nbsp;&amp;nbsp;which enables the application to create a fixed-size block pool in RAM. Apart from blinky example , it is also used in secure bootloader uart example, the function uart_dfu_transport_init() in nRF5_SDK_17.1.0_ddde560\components\libraries\bootloader\serial_dfu\nrf_dfu_serial_uart.c . One more thing,&amp;nbsp;nrf_balloc is not used for anything directly in blinky example, but it is used by nrf_log module to allocate buffers, etc. The logger module is included in blinky example.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope it helps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kazi Afroza Sultana&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is Block memory allocator ?</title><link>https://devzone.nordicsemi.com/thread/340622?ContentTypeID=1</link><pubDate>Thu, 25 Nov 2021 01:08:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de1ab7d3-4241-4b5f-b2b8-be573e794131</guid><dc:creator>kai19960504</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Sultana,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m not very sure what you mean.Do you have any example or teaching film.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kai&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is Block memory allocator ?</title><link>https://devzone.nordicsemi.com/thread/340503?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 10:16:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2ace1cb-df8b-42b1-9621-112ba02d193b</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Kai,&lt;/p&gt;
&lt;p&gt;Block allocator is used for opening up application implementation by offering dynamic memory allocations in systems. It is helpful to handle large objects as well.&lt;/p&gt;
&lt;p&gt;In the config file #define NRF_BALLOC_ENABLED sets as 1 to enable the Balloc module.&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrf__balloc.html?cp=8_5_4_6_11_4"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrf__balloc.html?cp=8_5_4_6_11_4&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Best Regards,&lt;/div&gt;
&lt;div&gt;Kazi Afroza Sultana&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>