Patent ID: 7996598

Claim:
A method comprising: searching for a free sector in a flash memory using a look up table (LUT) stored in a controller RAM coupled to the flash memory; writing look up table data read from said controller RAM into said free sector of the flash memory in order to free space in the controller RAM; checking if sufficient space has been freed in the controller RAM; if sufficient space has not been freed, writing a next look up table data read from said controller RAM into the free sector of the flash memory; when sufficient space has been freed, reading a page from a source sector of the flash memory and storing the read page in the freed space of the controller RAM previously occupied by the look up table data; reading data of said page from the controller RAM and storing the read page to a page of a destination sector of the flash memory; and writing the look up table data read from the free sector of the flash memory back to the controller RAM.