摘要 |
The present invention relates to an electronic device (10) including volatile memory (33), flash memory (34), and a CPU (31). The volatile memory (33) includes a first actual data region (33a, 33b; 33c) that records actual data and a first log region (33d) that records update information including update data used for updating the actual data. The flash memory (34) includes blocks and undergoes block unit initialization when writing is to be performed thereto. The blocks each include a second actual data region (341a, 341b; 341c) that records actual data and a second log region (342a, 342b; 342c) that records update information written from the first log region (33d). The CPU (31) writes update information corresponding to update data to the first log region (33d) when updating actual data using the update data. At a preset specific timing, the CPU (31) collects update information recorded in the first log region (33d), writes the collected update information to the second log regions (342a, 342b; 342c) in accordance with a specific order, and subsequently initializes the first log region (33d). |