mac关闭虚拟内存_为什么不应该关闭Mac上的虚拟内存

mac关闭虚拟内存

mac关闭虚拟内存

Your Mac comes with a set amount of physical memory applications can use. Your running programs, open files, and other data your Mac is actively working with are stored in this physical memory. But that’s a simplification—applications can also use “virtual memory”, which your Mac can compress and temporarily store on disk.

您的Mac随附了可以使用的一定数量的物理内存。 Mac正在使用的正在运行的程序,打开的文件以及其他数据都存储在此物理内存中。 但这只是一种简化-应用程序还可以使用“虚拟内存”,Mac可以将其压缩并临时存储在磁盘上。

There’s no official way to disable virtual memory on a modern Mac, although this was possible in the days before Mac OS X—now named macOS—was released. While it may be possible to hack your system to prevent your Mac from storing virtual memory on disk, you shouldn’t do this.

尽管在Mac OS X(现在称为macOS)发布之前的几天里,可以在现代Mac上禁用虚拟内存,但是没有官方的方法。 虽然可能会入侵您的系统以阻止Mac将虚拟内存存储在磁盘上,但您不应该这样做。

什么是虚拟内存? (What Is Virtual Memory?)

While your Mac only has a limited amount of physical memory, it exposes a larger area of available virtual memory to running programs. For example, even if you have a Mac with 8 GB of RAM, every 32-bit process on your Mac is given 4 GB of available address space it can use. Every 64-bit process is given about 18 exabytes—that’s 18 billion gigabytes—of space it can work with.

尽管Mac的物理内存量有限,但它会将较大的可用虚拟内存区域暴露给正在运行的程序。 例如,即使您的Mac具有8 GB的RAM,Mac上的每个32位进程也会获得4 GB的可用地址空间。 每个64位进程都可以使用大约18艾字节(即180亿千兆字节)的空间。

Applications are free to use as much memory as they want within these limitations. When your physical memory fills up, macOS automatically “pages out” data that isn’t actively being used, storing it on your Mac’s internal drive. When the data is needed again, it’s transferred back to RAM. This is slower than simply keeping the data in RAM all the time, but it allows for the system to transparently just “keep working”. If Macs couldn’t store virtual memory data on disk, you’d see messages asking you to close a program to continue.

在这些限制内,应用程序可以自由使用所需的内存。 当您的物理内存已满时,macOS会自动“调出”未被

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值