|
|
|
|
|
by typical182
892 days ago
|
|
> you can simply forbid pointers into the stack. This means that your GC doesn't need to be moving. I believe that's what Go does I might have misunderstood your comment, but FWIW, Go does allow pointers into the stack from the stack. When resizing/moving/copying a stack, the Go runtime does indeed find those pointers (via a stack map) and adjust them to point to the new stack locations. For example: https://github.com/golang/go/blob/b25f5558c69140deb652337afa... (The growable stacks I think replaced the segmented stacks circa Go 1.3 or so; I can't speak to whether they were contemplating growable stacks in the early days whilst considering whether to start their project with the Plan 9 toolchain, LLVM, or GCC, but to your broader point, they were likely considering multiple factors, including how quickly they could adapt the Plan 9 toolchain). |
|