Thursday, May 13, 2004

How Do I Add Temporary Swap Space in Linux?

In addition to a swap partition, Linux can also use a swap file. Some programs, like g++, can use huge amounts of virtual memory, requiring the temporary creation of extra space. To install an extra 64 MB of swap space, for example, use the following shell commands:

# dd if=/dev/zero of=/swap bs=1024 count=65535
# mkswap /swap
# swapon /swap

No comments:

Post a Comment