Patent ID: 8762623

Claim:
A method for managing a plurality of blocks of a Flash memory, the method being applied to a controller of a memory device, which comprises the Flash memory, the method comprising: after a specific host command is received from a host device external to the memory device, selecting at least one first block having invalid pages from the plurality of blocks in response to the specific host command received from the host device; and after the at least one first block is selected, determining a first portion of valid pages of the first block to be moved according to time required for moving the portion of valid pages, and moving the first portion of valid pages of the first block, rather than all valid pages of the first block, to a second block corresponding to the specific host command; after the first portion of valid pages of the first block is moved to the second block, receiving another host command from the host device, and moving a second portion of valid pages of the first block to the second block corresponding to the another host command, wherein the second portion of valid pages are different from the first portion of valid pages; wherein the specific host command is a writing command, and the step of moving the first portion of valid pages of the first block to the second block further comprises: after receiving the writing command from the host device, writing data corresponding to the writing command into the second block and utilizing the write command to trigger an operation of moving data of the first portion of valid pages of the first block to the second block.