Patent ID: 9645918
Date: 2017-05-09
CPC Classifications: G06F

Claim:
1. A write memory block allocating method of a memory controller configured to control a flash memory, comprising: generating a main pre-allocation table including allocation order information of a pre-allocated memory block included in the flash memory; storing the main pre-allocation table in a meta area of the flash memory; storing a pre-allocation table in a Random Access Memory (RAM) of the memory controller by reading the main pre-allocation table at the meta area of the flash memory; receiving a write request from a host; determining whether the write request is for a new logical unit; determining whether a write memory block for the write request can be allocated according to the pre-allocation table; allocating the pre-allocated memory block as the write memory block according to the pre-allocation table when the write request is not for a new logical unit and when the write memory block can be allocated according to the pre-allocation table; allocating a free memory block as the write memory block according to a tail-trail table in the memory controller when the write request is not for a new logical unit and when the write memory block cannot be allocated according to the pre-allocation table, wherein the pre-allocation table does not include allocation order information of the free memory block, and the tail-trail table includes a physical address of the free memory block and identification information of a logical unit of the write request; and allocating a free memory block as the write memory block without using the tail-trail table in the memory controller and the pre-allocation table when the write request is for a new logical unit.