Patent ID: 8706954

Claim:
A terminal apparatus comprising: a non-volatile memory for which writing is performed in units of blocks; and a control unit configured to perform a first method of managing bad blocks in the non-volatile memory with respect to blocks corresponding to an information management table in a file system of the non-volatile memory, and to perform a second method of managing bad blocks in the non-volatile memory with respect to blocks corresponding to user data in the file system, wherein the control unit is configured to allocate a plurality of blocks of the non-volatile memory to at least a management area and a replacement area, the management area including at least one block for storing management information, and the replacement area including a plurality of blocks for replacing bad blocks, wherein the first method of managing bad blocks is write remapping which includes replacing a bad block with a block in the replacement area, wherein the second method of managing bad blocks is write mapping which includes shifting to a next block by skipping over the bad block and performing access to the next block, which is not in the replacement area, without replacing the bad block with a block in the replacement area, and a selection of one of a plurality of types of methods of managing bad blocks, which includes at least the first method and the second method of managing bad blocks, is based on predetermined rules according to a combination, out of a predetermined plurality of combinations, of a type of process performed on the terminal apparatus and a type of data being accessed in the non-volatile memory, wherein the type of method of managing bad blocks is set in advance for each of the plurality of combinations based on a necessity to save the replacement area in view of each particular combination of the type of process and the type of data being accessed.