US 12,277,331 B2
Data storage device and method for determining buffer size of the data storage device
Po-Lin Wu, Hsinchu (TW)
Assigned to Silicon Motion, Inc., Hsinchu County (TW)
Filed by Silicon Motion, Inc., Hsinchu County (TW)
Filed on Jul. 10, 2023, as Appl. No. 18/219,705.
Claims priority of application No. 111139506 (TW), filed on Oct. 18, 2022.
Prior Publication US 2024/0126463 A1, Apr. 18, 2024
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 3/06 (2006.01); G06F 12/02 (2006.01)
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
OG exemplary drawing
 
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.