摘要 |
The present invention discloses a method and an apparatus for swapping in data to a memory, which implements a process of swapping in all data, in a swap partition of an operating system, of a determined process to a physical memory of the operating system. The method includes: determining, according to a received instruction command, a process in which data needs to be swapped in to a physical memory of an operating system; and swapping in all data, in a swap partition of the operating system, of at least one process of the determined processes to the physical memory of the operating system according to a current free memory capacity of the physical memory of the operating system. According to embodiments of the present invention, data that needs to be swapped in to a physical memory of an operating system and corresponds to at least one process can be actively swapped in to the physical memory at a time according to a user requirement. Because compared to the swap partition, a speed of performing read and write operations on data in the physical memory is much higher, a running speed of the process is effectively increased, and so a running speed of the operating system is also increased. |