From 47ca1c037baaa137aeb7387454a9c244d4168896 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Tue, 31 Jan 2023 15:45:44 +0900 Subject: [PATCH] Add custom-gc stub for ReadMemStats --- src/runtime/gc_custom.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runtime/gc_custom.go b/src/runtime/gc_custom.go index 0d538619..45857338 100644 --- a/src/runtime/gc_custom.go +++ b/src/runtime/gc_custom.go @@ -20,6 +20,7 @@ package runtime // - func free(ptr unsafe.Pointer) // - func markRoots(start, end uintptr) // - func GC() +// - func ReadMemStats(ms *runtime.MemStats) // // // In addition, if targeting wasi, the following functions should be exported for interoperability @@ -50,6 +51,9 @@ func markRoots(start, end uintptr) // GC is called to explicitly run garbage collection. func GC() +// ReadMemStats populates m with memory statistics. +func ReadMemStats(ms *MemStats) + func setHeapEnd(newHeapEnd uintptr) { // Heap is in custom GC so ignore for when called from wasm initialization. }