主权项 |
1. A method for selecting a victim memory block in a storage device for garbage collection comprising:
identifying, by a block selection system, a memory block having a minimum valid unit count among a plurality of memory blocks in the storage device; determining, by the block selection system, a wear count bit of the identified memory block to be one of a null wear count and a non-null wear count; selecting, by the block selection system, the identified memory block as the victim memory block for garbage collection upon determining the identified memory block having the null wear count; and performing, by the block selection system, upon determining the identified memory block having the non-null wear count:
dividing the plurality of memory blocks into a first set of memory blocks and a second set of memory blocks, wherein a minimum valid unit count and a wear count bit is identified for each memory block in the first set of memory blocks and the second set of memory blocks;iterating the division until a first target memory block having the minimum valid unit count and the null wear count from one of the first set of memory blocks and the second set of memory blocks is identified; andselecting the target memory block as the victim memory block for garbage collection. |