Skip to main content.
Navigation:
DENX
>
DULG
>
AddingSwap
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
%SECTION0{name=AddingSwap}% Adding Swap Space If you are running out of system RAM, you can add virtual memory by using _swap space_. If you reserved a swap partition on your disk drive, you have to initialize it once using the =mkswap= command: <verbatim> # fdisk -l /dev/hda Disk /dev/hda: 16 heads, 63 sectors, 1575 cylinders Units = cylinders of 1008 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 1 5 2488+ 83 Linux /dev/hda2 6 10 2520 83 Linux /dev/hda3 11 141 66024 82 Linux swap /dev/hda4 142 1575 722736 83 Linux # mkswap /dev/hda3 Setting up swapspace version 1, size = 67604480 bytes </verbatim> Then, to activate it, you use the =swapon= command like this: <verbatim> # free total used free shared buffers cached Mem: 14628 14060 568 8056 100 11664 -/+ buffers/cache: 2296 12332 Swap: 0 0 0 # free total used free shared buffers cached Mem: 14628 14060 568 8056 100 11664 -/+ buffers/cache: 2296 12332 Swap: 0 0 0 # swapon /dev/hda3 Adding Swap: 66016k swap-space (priority -2) # free total used free shared buffers cached Mem: 14628 14084 544 8056 100 11648 -/+ buffers/cache: 2336 12292 Swap: 66016 0 66016 </verbatim> If you forgot to reserve (sufficient) space in a separate partition on your disk, you can still use an ordinary file for swap space. You only have to create a file of appropriate size, and initialize it as follows: <verbatim> # mount /dev/hda4 /mnt # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/root 2087212 1378824 708388 67% / /dev/hda4 711352 20 675196 1% /mnt # dd if=/dev/zero of=/mnt/swapfile bs=1024k count=64 64+0 records in 64+0 records out # mkswap /mnt/swapfile Setting up swapspace version 1, size = 67104768 bytes </verbatim> Then activate it: <verbatim> # free total used free shared buffers cached Mem: 14628 14084 544 6200 96 11788 -/+ buffers/cache: 2200 12428 Swap: 0 0 0 # swapon /mnt/swapfile Adding Swap: 65528k swap-space (priority -3) # free total used free shared buffers cached Mem: 14628 14084 544 6200 96 11752 -/+ buffers/cache: 2236 12392 Swap: 65528 0 65528 </verbatim>
9.2. The TMPFS Virtual Memory Filesystem
1. Abstract
9.4. Splash Screen Support in Linux
Prev
Home
Next