aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAnuraag Agrawal <[email protected]>2023-01-31 15:45:44 +0900
committerRon Evans <[email protected]>2023-01-31 16:41:49 +0100
commit47ca1c037baaa137aeb7387454a9c244d4168896 (patch)
treec373786ec3f25e45258823f72822f2224631bd29
parentdf0f5ae1da0fdb7b136e70ca9bd1e3217c04dbcd (diff)
downloadtinygo-47ca1c037baaa137aeb7387454a9c244d4168896.tar.gz
tinygo-47ca1c037baaa137aeb7387454a9c244d4168896.zip
Add custom-gc stub for ReadMemStats
-rw-r--r--src/runtime/gc_custom.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/gc_custom.go b/src/runtime/gc_custom.go
index 0d538619b..45857338f 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.
}