摘要 |
A method for increasing service life of flash is provided. The method comprises the following steps: reading a data {T<i,j>} from the flash, calculating and obtaining the corresponding old original data Bi according to the mapping relationship, wherein i is a natural number, j=(n−1)˜0, n is an even number; determining whether the data Bi to be written in is the same as the old original data Bi by comparison, if they are the same, it is not necessary to update the data of this byte in the flash; if the value of the data Bi to be written in is not the same as the value of the old original data Bi, checking whether it is possible to write into the flash directly; if possible, writing into the flash directly; and if it is impossible to write into the flash directly, performing the operation of erasing block.
|