V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
th00000
V2EX  ›  问与答

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

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