mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 12:04:03 +00:00
runtime: move alloc_noheap call (pure refactor)
See the next commit, where this makes more sense.
This commit is contained in:
committed by
Ron Evans
parent
7ffbcbc666
commit
221ea6a54c
@@ -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
|
||||||
@@ -66,11 +66,6 @@ func llvm_sponentry() unsafe.Pointer
|
|||||||
//export strlen
|
//export strlen
|
||||||
func strlen(ptr unsafe.Pointer) uintptr
|
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
|
//export malloc
|
||||||
func malloc(size uintptr) unsafe.Pointer
|
func malloc(size uintptr) unsafe.Pointer
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user