aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/runtime/gc_stack_raw.go
blob: 0c37af60d52c11086b19616f82503a6fe1b3b3d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// +build gc.conservative
// +build cortexm tinygo.riscv

package runtime

// markStack marks all root pointers found on the stack.
//
// This implementation is conservative and relies on the stack top (provided by
// the linker) and getting the current stack pointer from a register. Also, it
// assumes a descending stack. Thus, it is not very portable.
func markStack() {
	markRoots(getCurrentStackPointer(), stackTop)
}