Patent ID: 8166231

Claim:
A memory controller connected to a nonvolatile memory having a plurality of physical blocks composed of a plurality of pages comprising: a reading and writing control part for writing file data to said nonvolatile memory on the basis of a file ID designated from an outside; a remaining capacity sending part for receiving a transfer rate to said nonvolatile memory from the outside, detecting the number of physical blocks in which the number of valid pages storing valid data in each physical block is at most the predetermined number determined depending on said transfer rate, detecting an empty capacity of said nonvolatile memory corresponding to said transfer rate, and outputting the detected empty capacity to an outside, wherein said remaining capacity sending part includes: a filling rate calculation part for determining the maximum number of valid pages in a physical block realizing said transfer rate on the basis of the transfer rate received from the outside: a remaining capacity table for obtaining the number of valid pages in each physical block of said nonvolatile memory and retaining the number of physical blocks for each of the numbers of valid pages; and a remaining capacity detection part for calculating summation of empty capacities of the physical blocks having the maximum number of valid pages determined by said filling rate calculation part or less and outputting the summation to an outside.