github.com/aykevl/tinygo@v0.5.0/src/runtime/gc_none.go (about) 1 // +build gc.none 2 3 package runtime 4 5 // This GC strategy provides no memory allocation at all. It can be useful to 6 // detect where in a program memory is allocated, or to combine this runtime 7 // with a separate (external) garbage collector. 8 9 import ( 10 "unsafe" 11 ) 12 13 func alloc(size uintptr) unsafe.Pointer 14 15 func free(ptr unsafe.Pointer) { 16 // Nothing to free when nothing gets allocated. 17 } 18 19 func GC() { 20 // Unimplemented. 21 } 22 23 func KeepAlive(x interface{}) { 24 // Unimplemented. Only required with SetFinalizer(). 25 } 26 27 func SetFinalizer(obj interface{}, finalizer interface{}) { 28 // Unimplemented. 29 }