Home Common Problem What does swap mean?

What does swap mean?

May 07, 2019 pm 01:13 PM
swap

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 of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1672
14
PHP Tutorial
1276
29
C# Tutorial
1256
24
What is linux swap space What is linux swap space Jul 18, 2023 am 11:58 AM

Linux swap space is a special hard disk space used for memory expansion in the Linux operating system. Its role is to provide additional virtual memory to ensure the normal operation of the system. Proper configuration and management of swap space can help maintain the stability and performance of the system regularly. It is the responsibility of the system administrator to monitor the usage of Swap space and adjust the size of the swap space according to the actual situation.

What is the use of turning off SWAP in Redis? What is the use of turning off SWAP in Redis? May 27, 2023 am 10:30 AM

Turn off SWAPSWAP is a memory swapping technology. Copy the memory to the preset disk space in pages. Memory is fast and expensive. Disks are slow and cheap. Generally, the more SWAP is used, the lower the system performance will be. Redis is an in-memory database, and using SWAP will cause rapid performance degradation. It is recommended to leave enough memory and turn off SWAP.

Steps and methods to add swap partition - Linux System Guide Steps and methods to add swap partition - Linux System Guide Jan 03, 2024 pm 07:10 PM

If you want to add a swap partition in a Linux system, how do you add it? Let’s take a look at the detailed tutorial below. 1. First, click "Launcher" on the dock bar, find "Deepin Terminal" and run it. 2. Then set a password for the root user. Because the installation process is for the administrator user, the root password is not set. sudopasswdroot3. After the setting is completed, execute the su command to switch to the root user. 4. Execute the following command to generate a swap file in the root directory, count sets the number of blocks, and bs sets the block size to generate a 4G swap. ddif=/dev/zeroof=/swapfilecou

How to solve the problem of high Linux Swap space utilization How to solve the problem of high Linux Swap space utilization May 27, 2023 pm 12:37 PM

What is swap? Swapspace is an area on the disk, which can be a partition, a file, or a combination of them. To put it simply, when the system's physical memory is tight, Linux will save infrequently accessed data in the memory to swap, so that the system has more physical memory to serve each process, and when the system needs to access the content stored on swap When, the data on the swap is loaded into the memory. This is what we often call swapout and swapin. Why is swap needed? To answer this question, we need to answer what benefits swap brings to us. For some large applications (such as LibreOffice, videoeditor

What should I do if deepin does not have a swap partition? What should I do if deepin does not have a swap partition? What should I do if deepin does not have a swap partition? What should I do if deepin does not have a swap partition? Feb 29, 2024 am 10:10 AM

During the use of deepin, some users find that their system lacks a swap partition and don’t know what to do. In fact, in most cases, it doesn’t matter if we don’t have a swap partition. If necessary, you can also manually create and mount a swap partition. to solve. What to do if deepin does not have a swap partition: 1. During installation 1. If there is no swap when we install the system partition, as shown in the figure. 2. At this time, you can exit the installation program first, then select swap under the file system item, and then install it. 2. Swap1 cannot be found. If we created a swap partition during installation but cannot find it when using it, it may be a resolution problem. 2. At this time we can try to enter the grub interface, in

How to set up swap virtual memory on Linux cloud server How to set up swap virtual memory on Linux cloud server May 15, 2023 pm 11:52 PM

Swap memory mainly means that when the physical memory is not enough, the system will enable part of the hard disk space to serve as server memory. By default, swap memory has some setting standards, which are also related to the size of physical memory. Check the memory space: free-h Create swap partition file: ddif=/dev/zeroof=/data/swapbs=1Mcount=4096 Code explanation: bs is the size of the block, count is the number of blocks, it is known that bs=1M, count= 4096, 1M*1024=4G swap partition virtual memory, /data/swap is the path where the swap file is created, the above parameters can be modified according to your own needs. m

Linux partition expansion tips for adjusting Swap space size Linux partition expansion tips for adjusting Swap space size Feb 29, 2024 am 11:43 AM

View the current Swap file location and size To view the location of the swap file or partition currently in use, you can use the swapon command. Execute the following command: sudoswapon --show This will display all active swap space, including its type (such as file or partition), size, usage, and location. If you are only interested in file paths or partition paths, you can view the same information through the /proc/swaps file: cat /proc/swaps This will list all swap spaces on the system, including their locations. Setting up a new Swap space On Manjaro (an Arch-based Linux distribution), you can use a variety of methods to set up a swap space.

How to set up swap on Linux cloud server How to set up swap on Linux cloud server May 18, 2023 pm 11:55 PM

Step 1: Confirm the status of swap. Use the following command to check the memory status: free-m. If the result shows that swap is 0, it means that swap does not exist and you need to create swap. totalusedfreesharedbufferscachedMem:1840161422615361340-/+buffers/cache:2381602Swap:000 or you can use this command to view it. If no results are output, swap does not exist. swapon-s Step 2: Create swap We use the following command to create a swap file with a size of 2GB. ddif=/dev/zeroof=/