runtime: move alloc_noheap call (pure refactor)

See the next commit, where this makes more sense.
This commit is contained in:
Ayke van Laethem
2026-05-25 18:28:05 +02:00
committed by Ron Evans
parent 7ffbcbc666
commit 221ea6a54c
2 changed files with 10 additions and 5 deletions
+10
View File
@@ -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
-5
View File
@@ -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