CPC G06F 3/064 (2013.01) [G06F 3/0656 (2013.01); G06F 12/0253 (2013.01); G06F 3/0604 (2013.01); G06F 3/0679 (2013.01)] | 10 Claims |
1. A data storage device, comprising:
a memory device, comprising a plurality of memory blocks, wherein the plurality of memory blocks comprise one or more spare memory blocks that are not written with data and one or more predetermined memory blocks that are configured as a buffer for receiving data from a host device; and
a memory controller, coupled to the memory device and configured to access the memory device, wherein the memory controller is configured to determine a setting value of a number of the one or more predetermined memory blocks according to a number of the one or more spare memory blocks, a number of the predetermined memory block(s) that has/have been written with data among the one or more predetermined memory blocks and a predetermined threshold, and configure the number of the one or more predetermined memory blocks as the buffer according to the setting value, wherein the memory controller is further configured to determine a summation of the number of the one or more spare memory blocks and the number of the predetermined memory block(s) that has/have been written with data, and determine the setting value according to a difference between the summation and the predetermined threshold.
|