Patent ID: 8065473
Filing Date: 2011-11-22
Classification: G06F

Abstract:
1. A method for controlling a memory card which includes a nonvolatile semiconductor memory whose memory area includes a plurality of write areas, the method comprising: formatting a first area which is a part of the plurality of write areas in accordance with management executed by a first file system which sequentially writes data along a direction in which addresses of the plurality of write areas increase; and formatting a second area which is a part of the plurality of write areas in accordance with management executed by a second file system which writes data in an order which does not depend on the addresses; creating a temporary file entry describing a size of a reserved region which is at least a free part of the plurality of write areas and a start position of the reserved region; writing a file of a plurality of data in the reserved region from the start position after creating the temporary file entry; and when the file has been completely written, determining a size of the file written and writing a final file entry describing the start position and the size of the file by writing the final entry based on the determined size of the file or overwriting the temporary file entry as the final file entry based on the determined size of the file; and when the file has not been completely written, referencing the temporary file entry to recognize the start position; detecting a final position in the reserved region, in final position data partly constituting an unfinished file which is a part of the file being written; determining a size of the unfinished file using the start position and the final position; and changing the temporary file entry to a final file entry describing the start position and the size of the unfinished file.