Home >Common Problem >What does swap mean?

What does swap mean?

藏色散人
藏色散人Original
2019-05-07 13:13:3319688browse

What does swap mean?

Swap: Swap partition

is similar to the virtual memory of Windows. When the memory is insufficient, a part of the hard disk space is virtualized into memory to solve the problem of insufficient memory capacity. Case. Android is a Linux-based operating system, so you can also use Swap partitions to improve system operating efficiency.

Extended information:

Not all data exchanged from physical memory will be put into Swap (if so, Swap will be overwhelmed), a considerable part of the data will be directly Swap to the file system.

For example, some programs will open some files and read and write files (in fact, every program must open at least one file, which is the running program itself). When the memory space of these programs needs to be swapped out, At this time, there is no need to put the data in the file part into the Swap space, but can be put directly into the file. If it is a file reading operation, the memory data is released directly and does not need to be swapped out, because it can be restored directly from the file system when needed next time; if it is a file writing operation, only the changed data needs to be saved to the file for recovery.

But the data of objects generated by malloc and new functions are different. They require Swap space because they do not have corresponding "reserve" files in the file system, so they are called "Anonymous". memory data. This type of data also includes some status and variable data in the stack. Therefore, Swap space is an exchange space for "anonymous" data.


The above is the detailed content of What does swap mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to use cms system?Next article:How to use cms system?

Related articles

See more