runtime: allow custom-gc SetFinalizer and clarify KeepAlive

This commit is contained in:
Anuraag Agrawal
2023-02-17 08:51:51 +09:00
committed by GitHub
parent e0a5fc2555
commit f6df276118
5 changed files with 19 additions and 4 deletions
+4
View File
@@ -20,6 +20,7 @@ package runtime
// - func free(ptr unsafe.Pointer)
// - func markRoots(start, end uintptr)
// - func GC()
// - func SetFinalizer(obj interface{}, finalizer interface{})
// - func ReadMemStats(ms *runtime.MemStats)
//
//
@@ -51,6 +52,9 @@ func markRoots(start, end uintptr)
// GC is called to explicitly run garbage collection.
func GC()
// SetFinalizer registers a finalizer.
func SetFinalizer(obj interface{}, finalizer interface{})
// ReadMemStats populates m with memory statistics.
func ReadMemStats(ms *MemStats)