Split stacks unneccesary on amd64

后端 未结 3 633
遇见更好的自我
遇见更好的自我 2021-01-01 19:38

There seems to be an opinion out there that using a \"split stack\" runtime model is unnecessary on 64-bit architectures. I say seems to be, because I haven\'t seen anyone

3条回答
  •  隐瞒了意图╮
    2021-01-01 20:12

    The Go core team is currently discussing the possibility of using contiguous stacks in a future Go version.

    The split stack approach is useful because stacks can grow more flexibly but it also requires that the runtime allocates a relatively big chunk of memory to distribute these stacks across. There has been a lot of confusion about Go's memory usage, in part because of this.

    Making contiguous but growable (relocatable) stacks is an option that would provide the same flexibility and maybe reduce the confusion about Go's memory usage. As well as remedying some ill corner-cases on low-memory machines (see linked thread).

    As to advantages/disadvantages on 32-bit vs. 64-bit architectures, I don't think there are any directly associated solely with the use of segmented stacks.

提交回复
热议问题