主权项 |
1. A memory controller, comprising:
a memory control section-that accesses a readable/writable nonvolatile memory and reads and writes data on the basis of a sector unit of a file system established for the nonvolatile memory; and a table storage that stores a table that associates sector sections created by dividing all sectors of the file system into multiple sections under a given condition with different memory regions on the nonvolatile memory, respectively, and with an accumulated number of times obtained by accumulating a number of times of moving the sectors as a result of the execution of a garbage collection, the different memory regions each comprising a plurality of purging blocks, wherein the memory control section: makes reference to the table to identify a memory region corresponding to a specified sector, and searches the identified memory region range for a physical address corresponding to the specified sector; moves a specified sector within the identified memory region range for rewriting data corresponding to the specified sector; writes data; and
by executing the garbage collection in which whether a number of free sectors belonging to the identified memory region is equal to or greater than a given number is determined, a purging block is selected as a purging target if the number of free sectors is less than the given number, and all used sectors within the selected purging-target purging block are moved to another purging block in the identified memory region, andpurging the purging-target purging block after the execution of the garbage collection, changes a correspondence between the sector sections and the memory regions in the table based on the accumulated number of times. |