摘要 |
The present invention discloses a method for managing memory blocks in a flash memory. The method is first to calculate the total number of good blocks and total number of bad blocks in the flash memory, and then all the good blocks and the bad blocks will be evenly allocated to each segment according to the number of segments contained in the flash memory. After the allocation, the allocation information will be recorded in one good block to form a data block so that when the flash memory is executing initialization, the controller chip may find the data block, and store the data in the SRAM (static random access memory) of the flash memory. Then, according to the data stored in the SRAM, the controller chip may generate a corresponding table for the block contained in the segment according to the data stored in the SRAM. As a result, the flash memory may be used with lower capacity and may obviate the problem of being unusable when the flash memory contains the excessive amount of the bad blocks.
|