compiler: add //go:noheap pragma

This commit is contained in:
Ayke van Laethem
2026-05-20 11:01:50 +02:00
committed by Ayke
parent 7b486e398a
commit 85d223c5e2
12 changed files with 135 additions and 10 deletions
+5
View File
@@ -66,6 +66,11 @@ 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