<?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&amp;#39;s peer manager default GC policy when buffer is full?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78460/what-s-peer-manager-default-gc-policy-when-buffer-is-full</link><description>Hi, 
 Would you please explain the default behavior of peer manager Garbage collection when buffer is full if I don&amp;#39;t call Garbage Collection? 
 I have tested with small number of phones until buffer full and seems GC removes duplicated phone information</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Aug 2021 13:18:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78460/what-s-peer-manager-default-gc-policy-when-buffer-is-full" /><item><title>RE: What's peer manager default GC policy when buffer is full?</title><link>https://devzone.nordicsemi.com/thread/324676?ContentTypeID=1</link><pubDate>Thu, 12 Aug 2021 13:18:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdb37361-f31f-43af-a20b-b6d8fce0decb</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Documentation for the Peer Manager can be found here:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_peer_manager.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_peer_manager.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Garbage collection reclaims the flash space that is occupied by records that have been deleted, or that failed to be completely written due to, for example, a power loss.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Usually&lt;span&gt;, you will call&amp;nbsp;pm_handler_flash_clean()&amp;nbsp; in&amp;nbsp;pm_evt_handler(),&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Flib_pm_usage.html&amp;amp;cp=8_1_3_2_7_2_2&amp;amp;anchor=lib_pm_usage_events"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Flib_pm_usage.html&amp;amp;cp=8_1_3_2_7_2_2&amp;amp;anchor=lib_pm_usage_events&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__pm__handler.html?cp=8_1_6_2_16_2_2#ga143031c4ec929f76d406f5c7c40dcb8a"&gt;pm_handler_flash_clean()&lt;/a&gt;&amp;nbsp;will do&amp;nbsp;&lt;/span&gt;the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ranks peers by when they last connected.&lt;/li&gt;
&lt;li&gt;Garbage collects the flash when needed.&lt;/li&gt;
&lt;li&gt;Deletes the lowest ranked peer(s) when garbage collection is insufficient.&lt;/li&gt;
&lt;/ul&gt;
[quote user=""]And Is there any detail document which explains garbage collection?[/quote]
&lt;p&gt;Yes, here:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Flib_fds_functionality.html&amp;amp;cp=8_1_3_16_1_2&amp;amp;anchor=lib_fds_functionality_gc"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Flib_fds_functionality.html&amp;amp;cp=8_1_3_16_1_2&amp;amp;anchor=lib_fds_functionality_gc&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>