linux的缓存太大,如果Linux缓存太大,为什么QEMU不能分配内存?

编程入门 行业动态 更新时间:2024-10-08 08:27:23

linux的缓存<a href=https://www.elefans.com/category/jswz/34/1740923.html style=太大,如果Linux缓存太大,为什么QEMU不能分配内存?"/>

linux的缓存太大,如果Linux缓存太大,为什么QEMU不能分配内存?

如果我使用我的机器[Ubuntu 16.04 64位,内核4.4]一段时间,QEMU需要删除内核缓存,否则,它将无法分配RAM.

为什么会这样?

这是一个示例运行:

~$free -m

total used free shared buff/cache available

Mem: 15050 5427 3690 56 5931 4803

Swap: 0 0 0

~$sudo qemu-system-x86_64 -m 10240 # and other options

qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory

~$echo 3 | sudo tee /proc/sys/vm/drop_caches

3

~$free -m

total used free shared buff/cache available

Mem: 15050 1799 9446 56 3803 9414

Swap: 0 0 0

~$sudo qemu-system-x86_64 -m 10240 # and other options

qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory

~$echo 3 | sudo tee /proc/sys/vm/drop_caches

3

~$free -m

total used free shared buff/cache available

Mem: 15050 1502 10819 56 2727 10784

Swap: 0 0 0

~$sudo qemu-system-x86_64 -m 10240 # and other options

# Now QEMU starts

更多推荐

linux的缓存太大,如果Linux缓存太大,为什么QEMU不能分配内存?

本文发布于:2024-03-09 07:15:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1724257.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:太大   缓存   分配   内存   linux

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!