This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Question about flash data storage module and garbage collection

Hi to all, 

i am developing a device with nrf52840 soc and i want use flash data storage module. i want to know what will happen if i had opened a record to read with fds_record_open function and before closing this record i call fds_gc function ?? garbage collection will start the process or no ??

Parents
  • Hi

    As stated in the infocenter: "Deleting a record does not actually delete the record data and clear the used flash space, but it invalidates the record.....Instead of deleting records right away, FDS relies on garbage collection to reclaim flash space used by records that have been invalidated."

    Which means that your record will not be deleted if you have not invalidated it by calling the function  fds_record_delete(&descriptor) first. More information regarding the FDS library can be found here

    Moreover the garbage collection will delete every record that has been invalidated once it is called. 

    Cheers

    Jared

Reply
  • Hi

    As stated in the infocenter: "Deleting a record does not actually delete the record data and clear the used flash space, but it invalidates the record.....Instead of deleting records right away, FDS relies on garbage collection to reclaim flash space used by records that have been invalidated."

    Which means that your record will not be deleted if you have not invalidated it by calling the function  fds_record_delete(&descriptor) first. More information regarding the FDS library can be found here

    Moreover the garbage collection will delete every record that has been invalidated once it is called. 

    Cheers

    Jared

Children
No Data
Related