How to Modify the Virtual Memory in a Mac
2013-04-03 19:44
405 查看
转自:http://techtips.salon.com/modify-virtual-memory-mac-1675.html
Like Windows PCs, Macintosh computers use virtual memory to run more programs than the system memory normally could accommodate. A Mac uses a swap file to temporarily store applications
and program components that it does not need at the moment. When it needs something from the swap file, it retrieves it and reloads it into RAM. While it's useful, virtual memory can cause your system to run more slowly. You can do a few things to modify the
virtual memory of your Mac and increase performance. Some relatively simple fixes include increasing system RAM or running fewer programs, or you can basically turn off virtual memory by deactivating the swap file.
Increase your Mac's RAM. This makes the Mac rely on virtual memory less, which in turn makes it run more quickly.
Make sure you have space available on your hard drive. The swap file increases as needed, and it is on your Mac's hard drive. The more hard drive space you have, the more virtual memory you have available.
Run fewer programs simultaneously. Take a look at the applications you have running. Decide if you need them all running at the same time.
Open the Terminal program. You'll find it in the Utilities folder under the Applications folder.
To turn off the swap file, type this command into the Terminal window:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
To remove the swap files on your system, type this command into the Terminal window:
sudo rm /private/var/vm/swapfile*
Close the Terminal program.
Open the Terminal program.
Type this command in the terminal window: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
Close the Terminal program.
Making changes to your system memory can cause performance problems or hardware
and software failures. Be very careful when you make these changes.
OS
X Daily: Mac Virtual Memory -- What It Is, the Swap Location, and How to Disable Swap in Mac OS X
"Mac OS X Snow Leopard: The Missing Manual"; David Pogue; 2009
![](http://img.my.csdn.net/uploads/201304/03/1364989739_9591.jpg)
Andrew McClain has been writing since 1994. He has written several articles for various websites and writes user guides and software manuals for several freelance clients. He has a Bachelor of Arts in journalism from the University of Missouri.
Like Windows PCs, Macintosh computers use virtual memory to run more programs than the system memory normally could accommodate. A Mac uses a swap file to temporarily store applications
and program components that it does not need at the moment. When it needs something from the swap file, it retrieves it and reloads it into RAM. While it's useful, virtual memory can cause your system to run more slowly. You can do a few things to modify the
virtual memory of your Mac and increase performance. Some relatively simple fixes include increasing system RAM or running fewer programs, or you can basically turn off virtual memory by deactivating the swap file.
Easier Modifications
Step 1
Increase your Mac's RAM. This makes the Mac rely on virtual memory less, which in turn makes it run more quickly.
Step 2
Make sure you have space available on your hard drive. The swap file increases as needed, and it is on your Mac's hard drive. The more hard drive space you have, the more virtual memory you have available.
Step 3
Run fewer programs simultaneously. Take a look at the applications you have running. Decide if you need them all running at the same time.
Deactivate the Swap File
Step 1
Open the Terminal program. You'll find it in the Utilities folder under the Applications folder.
Step 2
To turn off the swap file, type this command into the Terminal window: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
Step 3
To remove the swap files on your system, type this command into the Terminal window:sudo rm /private/var/vm/swapfile*
Step 4
Close the Terminal program.
Reactivate the Swap File
Step 1
Open the Terminal program.
Step 2
Type this command in the terminal window: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
Step 3
Close the Terminal program.
Warnings
Making changes to your system memory can cause performance problems or hardwareand software failures. Be very careful when you make these changes.
References
OSX Daily: Mac Virtual Memory -- What It Is, the Swap Location, and How to Disable Swap in Mac OS X
"Mac OS X Snow Leopard: The Missing Manual"; David Pogue; 2009
About the Author
![](http://img.my.csdn.net/uploads/201304/03/1364989739_9591.jpg)
Andrew McClain has been writing since 1994. He has written several articles for various websites and writes user guides and software manuals for several freelance clients. He has a Bachelor of Arts in journalism from the University of Missouri.
相关文章推荐
- How to Modify the Virtual Memory in a Mac
- How to modify virtual address space in Windows
- How to enable the root user in Mac OS X Lion
- How to fix the issue that GEM_HOME and/or GEM_PATH not set issue for rvm in mac version 10.12
- How to Increase the Memory Limit for 32-bit Applications in Windows 64-bit OS
- virtual memory layout and how to get it by the correspoinding functuon
- how to modify the enviroment varible in Ubuntu
- How to Use the TimeDistributed Layer for Long Short-Term Memory Networks in Python 译文
- How to Modify the web.config file in SharePoint using SPWebConfigModification?
- How to Run Mac OS X in VirtualBox on Windows
- Mac环境下mysql初始化密码问题--If you lose this password, please consult the section How to Reset the Root Password in the MySQL reference manual.
- How to access the features in an in-memory output layer using an IFeatureCursor
- How to fix the gray screen bug in VirtualBox
- How to access the features in an in-memory output layer using an IFeatureCursor
- How To Catch The Memory Zombie In Xcode
- How to modify the response element name in soap message?
- How to set the JAVA_HOME variable in Mac OS X – Snow Leopard
- How to programmatically clear the filesystem memory cache in C++ on a Linux system?
- How to modify the Header Search Paths In XCode 4
- 《How to Use the TimeDistributed Layer for Long Short-Term Memory Networks in Python》学习笔记