diff --git a/src/runtime/gc.go b/src/runtime/gc.go new file mode 100644 index 000000000..c8c1706e9 --- /dev/null +++ b/src/runtime/gc.go @@ -0,0 +1,10 @@ +package runtime + +// Shared code for the various garbage collectors. + +import "unsafe" + +// Special alloc function that should never actually be called. +// It is used instead of normal alloc in //go:noheap functions, and must either +// be optimized away or throw a linker error. +func alloc_noheap(size uintptr, layout unsafe.Pointer) unsafe.Pointer diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go index 872b225b9..c9b095938 100644 --- a/src/runtime/runtime.go +++ b/src/runtime/runtime.go @@ -66,11 +66,6 @@ func llvm_sponentry() unsafe.Pointer //export strlen func strlen(ptr unsafe.Pointer) uintptr -// Special alloc function that should never actually be called. -// It is used instead of normal alloc in //go:noheap functions, and must either -// be optimized away or throw a linker error. -func alloc_noheap(size uintptr, layout unsafe.Pointer) unsafe.Pointer - //export malloc func malloc(size uintptr) unsafe.Pointer