th00000
V2EX  ›  问与答

如果 ZGC 在虚拟内存不足或未开启虚拟内存的时候会怎么样呢?

  •  
  •   th00000 · Apr 19, 2021 · 1427 views
    This topic created in 2027 days ago, the information mentioned may be changed or developed.

    已知 ZGC 使用着色指针将物理内存映射为多个虚拟内存来实现快速垃圾收集

    我尝试在 Ubuntu 20.04 中将 SWAP 关闭, 在 Docker 中使用 ZGC, 发现也可以正常使用

    所以有点没想通具体的原因

    3 replies  •  2021-04-20 14:05:41 +08:00
    Kaciras
    Kaciras
    Apr 19, 2021
    1
    这两个虚拟内存不是一回事
    th00000
    th00000
    OP
    Apr 20, 2021
    2
    @Kaciras #1 能详细说说吗?
    goodboy95
    goodboy95
    Apr 20, 2021
    3
    @th00000 在操作系统原理上,如果提及“虚拟内存”的话,一般指将多个不连续的内存区域虚拟成一个连续的内存区域,与 swap 没有直接关联。
    ZGC 没咋用过,猜测也是这种虚拟出连续内存的情况。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   907 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:33 · PVG 06:33 · LAX 14:33 · JFK 17:33
    ♥ Do have faith in what you're doing.