Patent ID: 7702844
Filing Date: 2010-04-20
Classification: G06F

Abstract:
1. A method for writing data in a flash memory, the flash memory including at least one block having a plurality of physical pages, each page comprising a predetermined number of sectors, and the data being written on a sector basis or a page basis and being erased on a block basis, the method comprising: a first step of determining whether a first sector is empty in a first physical page of the plurality of the pages having a most recently written logical page number of the data to be written, and an offset of the first sector matches an offset of the data to be written; a second step of, if it is determined in the first step that the first sector of which the offset matches the offset of the data is empty, writing the data in the first sector of the first physical page; and a third step of, if it is determined in the first step that the first sector of which the offset matches the offset of the data is not empty, selecting an empty second physical page to write the data to a second sector in the selected empty second physical page wherein an offset of the second sector matches the offset of the data to be written, and writing the most recently written logical page number for the data to the selected empty second physical page, wherein, prior to the first step, whether a logical page number of the data to be written has ever been written is determined and, if the logical page number has been written, the first step is performed, and, otherwise, the data and the logical page number of the data is written to a position prescribed by an existing physical logical mapping information.