<?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>About garbage collection logic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60065/about-garbage-collection-logic</link><description>SDK: 15.3.0 Device: EYSHJNZWZ (nRF52832) 
 Please tell me the operation when garbage collection is executed. The setting values of FDS are shown below for reference. 
 
 We recognize that it has the following configuration. ① Virtual page for garbage</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Apr 2020 01:57:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60065/about-garbage-collection-logic" /><item><title>RE: About garbage collection logic</title><link>https://devzone.nordicsemi.com/thread/244571?ContentTypeID=1</link><pubDate>Wed, 15 Apr 2020 01:57:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94124aa3-a78b-4aed-b77e-f7a8584dd302</guid><dc:creator>takashina hiroki</dc:creator><description>&lt;p&gt;&amp;gt;&amp;gt; This way we only do erasing the page once in a while (when doing GC) and limit the number of time an area in flash being erased.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m also asking about the number of times the flash is deleted with different tickets.&lt;br /&gt;If you don&amp;#39;t mind, can you answer to that as well?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/60069/number-of-times-flash-is-deleted-by-garbage-collection"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/60069/number-of-times-flash-is-deleted-by-garbage-collection&lt;/a&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/60073/how-to-calculate-flash-life-by-garbage-collection"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/60073/how-to-calculate-flash-life-by-garbage-collection&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About garbage collection logic</title><link>https://devzone.nordicsemi.com/thread/244568?ContentTypeID=1</link><pubDate>Wed, 15 Apr 2020 01:48:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e61565df-ee98-4b3b-b604-248b65aad1ca</guid><dc:creator>takashina hiroki</dc:creator><description>&lt;p&gt;What if the number of valid data records in ① and ② is larger than the size of the GC page?&lt;/p&gt;
&lt;p&gt;Where does the GC page go?&lt;br /&gt;Will they move one by one in the order of page numbers?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About garbage collection logic</title><link>https://devzone.nordicsemi.com/thread/244502?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 15:16:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20f12f7c-6604-4ef9-8d53-55a8cbeec54c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Takashina,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can read more about the garbage collection (GC) here:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_fds_functionality.html?cp=7_1_3_56_1_2#lib_fds_functionality_gc"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_fds_functionality.html?cp=7_1_3_56_1_2#lib_fds_functionality_gc&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Basically, the FDS system doesn&amp;#39;t do the erasing (or updating) a record. It only marks the records as deleted (invalidated).&amp;nbsp;When (1) and (2) are full (of both invalided and valid records) the&amp;nbsp;&lt;span&gt;PM_EVT_STORAGE_FULL is generated. The application will have to call&amp;nbsp;fds_gc(). This is when GC started. It will start with erasing the GC&amp;#39;s page. Then copying the valid records inside (1) and (2) to the GC page and use the GC as one of the valid page. It continue o all data page, from (1) to (2) and so on.&amp;nbsp;&lt;br /&gt;&lt;/span&gt;This way we only do erasing the page once in a while (when doing GC) and limit the number of time an area in flash being erased. The GC page is not fixed to a physical page in flash but move from one page to another (rotating) so that we don&amp;#39;t have a the same page being used as GC page. If the page doesn&amp;#39;t have any invalided record, it will not be GC hence doesn&amp;#39;t get erased.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>