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

Number of times FLASH is deleted by garbage collection

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.

#define FDS_ENABLED 1
#define FDS_VIRTUAL_PAGES 3
#define FDS_VIRTUAL_PAGE_SIZE 1024
#define FDS_VIRTUAL_PAGES_RESERVED 0

We recognize that it has the following configuration.
① Virtual page for garbage collection
② Usable virtual page A
③ Usable virtual page B

"PM_EVT_STORAGE_FULL" is generated when ② and ③ are full.
At that time, garbage collection is executed by calling "fds_gc".


By performing garbage collection, I think that and ③ will be deleted once.
I'm not sure about ①.
① manages two of ② and ③.
Therefore, is ① deleted twice?

How many times are deleted by garbage collection?
Please tell us about each of pages ① and ② and ③.

Parents
  • Hi

    I apologize for the delayed reply, but we're working on the backlog after the Easter Holiday here in Norway.

    Each page will only be deleted once, as the GC virtual page is not fixed to a physical page in flash, but move from one to another during the garbage collection. This way, the same page won't be used twice using a garbage collection, so no pages will be deleted twice.

    Best regards,

    Simon

Reply
  • Hi

    I apologize for the delayed reply, but we're working on the backlog after the Easter Holiday here in Norway.

    Each page will only be deleted once, as the GC virtual page is not fixed to a physical page in flash, but move from one to another during the garbage collection. This way, the same page won't be used twice using a garbage collection, so no pages will be deleted twice.

    Best regards,

    Simon

Children
  • Suppose you have changed the FDS settings to:

    #define FDS_ENABLED 1
    #define FDS_VIRTUAL_PAGES 5
    #define FDS_VIRTUAL_PAGE_SIZE 1024
    #define FDS_VIRTUAL_PAGES_RESERVED 0

    We recognize that it has the following configuration.
    ① Virtual page for garbage collection
    ② Usable virtual page A
    ③ Usable virtual page B
    ④ Usable virtual page C
    ⑤ Usable virtual page D

    Even then, Each page will only be deleted once?

    Is each page deleted only once even if "FDS_VIRTUAL_PAGES" is changed?

Related