The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
enjoychen0318

求教: go 内存管理的问题

  •  
  •   enjoychen0318 · Jan 20, 2022 · 2016 views
    This topic created in 1581 days ago, the information mentioned may be changed or developed.
    当一个 P ( P1 )队列中的 goroutine 被其他 P 窃取时,
    P1 的 mcache 中与 gorouting 相关的内存时如何转移的?
    有大佬知道吗?
    查了很久没看到相关文章。。还是说我查的姿势不对?
    2 replies    2022-02-11 11:43:27 +08:00
    claytonxia
        1
    claytonxia  
       Feb 11, 2022
    内存需要转移么,又没有回收和释放
    enjoychen0318
        2
    enjoychen0318  
    OP
       Feb 11, 2022
    @claytonxia
    比如一个 G 在 P1 上,并且 G 里面引用了 P1 的 mcache 的对象( O1 )里,当 G 被 P2 窃取时,O(1)需要转移把?
    不转移的话 G 在 P2 里应该是访问不到 P1 的 mcache ?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2388 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 16:08 · PVG 00:08 · LAX 09:08 · JFK 12:08
    ♥ Do have faith in what you're doing.