Skip to content

Commit 47ca1c0

Browse files
anuraagadeadprogram
authored andcommitted
Add custom-gc stub for ReadMemStats
1 parent df0f5ae commit 47ca1c0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/runtime/gc_custom.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ package runtime
2020
// - func free(ptr unsafe.Pointer)
2121
// - func markRoots(start, end uintptr)
2222
// - func GC()
23+
// - func ReadMemStats(ms *runtime.MemStats)
2324
//
2425
//
2526
// In addition, if targeting wasi, the following functions should be exported for interoperability
@@ -50,6 +51,9 @@ func markRoots(start, end uintptr)
5051
// GC is called to explicitly run garbage collection.
5152
func GC()
5253

54+
// ReadMemStats populates m with memory statistics.
55+
func ReadMemStats(ms *MemStats)
56+
5357
func setHeapEnd(newHeapEnd uintptr) {
5458
// Heap is in custom GC so ignore for when called from wasm initialization.
5559
}

0 commit comments

Comments
 (0)