博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to Modify the Virtual Memory in a Mac
阅读量:7240 次
发布时间:2019-06-29

本文共 2405 字,大约阅读时间需要 8 分钟。

转自:
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 hardware and software failures. Be very careful when you make these changes.

References

  • "Mac OS X Snow Leopard: The Missing Manual"; David Pogue; 2009

About the Author

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.

转载于:https://www.cnblogs.com/sesexxoo/archive/2013/04/03/6189948.html

你可能感兴趣的文章
Linux——网络端口的状态netstat、ifconfig
查看>>
canvas元素简易教程(5)(大部分转自火狐,自己只写了简单的代码分析)
查看>>
ArcCore重构-生成%_offset.h文件
查看>>
关于kafka的新的group无法订阅到topic中历史消息的问题
查看>>
zp_bj_03
查看>>
Idea 实时编译 和 热部署
查看>>
如何javascript获取css中的样式
查看>>
mysql INFORMATION_SCHEMA (转)
查看>>
多线程之异步编程: 经典和最新的异步编程模型,async与await
查看>>
length
查看>>
JDK源码阅读--HashMap
查看>>
Adroid 展开收起效果实现
查看>>
PHP:第五章——字符串转换与比较
查看>>
0阶 无符号指数哥伦布编码
查看>>
18、配置嵌入式servlet容器(2)
查看>>
URL重写
查看>>
移植spdylay到libcurl
查看>>
Codeforces Round #447 (Div. 2) C. Marco and GCD Sequence【构造/GCD】
查看>>
求多个区间合并后区间大小的巧妙解决方法【差分】
查看>>
转载:AAC编解码概述
查看>>