1. An information processing apparatus, comprising: a processor configured to perform data processing; a first memory coupled to the processor and configured to store processing data obtained by the data processing performed by the processor; and a second memory coupled to the processor, wherein a first data storage region is set in the second memory and a second data storage region not overlapping with the first data storage region is set in the second memory, the second data storage region having a second data capacity and the first data storage region having a first data capacity smaller than the second data capacity, and the processor is configured to, when the information processing apparatus operates normally, select the second data storage region as a storage region for data to be written from the first memory to the second memory by swap processing, and select the first data storage region as a storage region for data to be written from the first memory to the second memory by dump processing, and when a failure occurs in the information processing apparatus, select the second data storage region as the storage region for data to be written from the first memory to the second memory by the dump processing.