• sales

    +86-0755-88291180

Milk-V Duo Tutorial【Enable virtual RAM memory】

Virtual memory is a technology in the operating system that is used to expand the capacity of a computer's physical memory (RAM). It works by storing some data on the disk and loading active data from the disk into memory to meet the memory requirements of processes.


1】Virtual memory has the following advantages:

Expanded memory capacity: 

Virtual memory allows the operating system to expand the available memory capacity when physical memory is insufficient. It moves less frequently used data to a swap file on the disk to free up memory for other processes.

Running more programs: 

Virtual memory makes it possible to run multiple programs simultaneously. Each program is allocated a portion of virtual memory, so even if physical memory cannot accommodate all the data of all programs at the same time, memory usage can be switched by swapping data to the disk.

Larger address space: 

Virtual memory allows each process to access a larger address space beyond the limitations of physical memory. Processes can perceive a contiguous block of memory space, even though their data is actually scattered across physical memory and the disk.

Better memory management: 

Virtual memory can automatically manage memory paging (dividing memory into fixed-sized pages), provide memory protection (preventing processes from accessing memory beyond their boundaries), and implement mechanisms such as memory sharing and memory mapping.


Virtual memory offers significant advantages in terms of memory expansion and multitasking, but it also introduces performance overhead and additional complexity. In modern computer systems, virtual memory is an essential component and is widely used in various operating systems.


2】Enabling virtual memory in milkv-Duo:

Before using, make sure that milkv-Duo is using the system image Duo-V1.0.4 or above.

Enter the following commands in the terminal:

mkswap /dev/mmcblk0p3

swapon /dev/mmcblk0p3

Enter 'free -h' to check if virtual memory is enabled.


TAG: Raspberry Pi 7.5 inch e-Paper link (H) RYBW 800x480 For Arduino / Jetson Nano / STM32 Raspberry Pi 5inch Display 1024x600 HDMI Capacitive TouchScreen 5 inch LCD B Wide-Cover For Mini PC RP2040 ESP32-Hi Mechanical Dog ESP32 C3 Servo AI Voice Chat Development Board Deepseek SIM7600G H Mini PCIe SIMCom Original 4G LTE Cat-4 Module Global Coverage GNSS SP3232EEN Sipeed Lichee Tang Nano 9K FPGA MINI Development Board GW1NR-9 GOAI Gowin Raspberry Pi Refractive Prism Raspberry Pi 5 Power Raspberry Pi Pico RP2040 C Environment Window Raspberry Pi 3D Display Package Kit Raspberry Pi CM4S08032 And Compute Module PoE IO Board SPI Communication Raspberry Pi 5inch Display Raspberry Pi 5 PCIe to USB Gen1 HUB and M.2 NVMe SSD PI5 Expansion board HAT+ ESP32 S3 Development Board 2.8 inch B LCD 2.8inch Display 480x640 TouchScreen QMI8658 Sensor / Battery Port LVGL/HMI For Arduino Code Raspberry Pi 5 Raspberry Pi USB Camera 12MP IMX378 30fps onboard dual microphones Also For Jeston / RDK Raspberry Pi 5