From 3b81300088be0b640e05dc356a5799d3cce7e450 Mon Sep 17 00:00:00 2001 From: ltzMaxwell Date: Wed, 8 Jan 2025 23:38:56 +0800 Subject: [PATCH] fixup --- gnovm/tests/files/alloc1.gno | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnovm/tests/files/alloc1.gno b/gnovm/tests/files/alloc1.gno index daeee29425c..2f970ad5b18 100644 --- a/gnovm/tests/files/alloc1.gno +++ b/gnovm/tests/files/alloc1.gno @@ -12,12 +12,15 @@ type Foo struct{ name string } func bar() { f := &Foo{"foo"} + f2 := f println(f) bb := &Foo{"bar"} + println("MemStats 2: ", std.MemStats()) } func main() { a := 1 + println("MemStats 1: ", std.MemStats()) bar() println("MemStats before GC: ", std.MemStats()) std.GC() @@ -25,6 +28,8 @@ func main() { } // Output: +// MemStats 1: Allocator{maxBytes:10000000000,bytes,bytes:1904} // &(struct{("foo" string)} main.Foo) -// MemStats before GC: Allocator{maxBytes:10000000000,bytes,bytes:4440} +// MemStats 2: Allocator{maxBytes:10000000000,bytes,bytes:5984} +// MemStats before GC: Allocator{maxBytes:10000000000,bytes,bytes:7488} // MemStats after GC: Allocator{maxBytes:10000000000,bytes,bytes:3197}