Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions examples/helloworld/greeting/greet_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions examples/host-function-library/proto/greet_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions examples/host-functions/greeting/greet_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions examples/known-types/known/known_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions examples/wasi/cat/cat_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions gen/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,6 @@ func genPluginMethod(g *protogen.GeneratedFile, f *fileInfo, method *protogen.Me
resSize &^= %s
}

// We don't need the memory after deserialization: make sure it is freed.
if resPtr != 0 {
defer p.free.Call(ctx, uint64(resPtr))
}

// The pointer is a linear memory offset, which is where we write the name.
bytes, ok := p.module.Memory().Read(resPtr, resSize)
if !ok {
Expand Down
15 changes: 0 additions & 15 deletions tests/fields/proto/fields_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions tests/host-functions/proto/host_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions tests/import/proto/bar/bar_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions tests/import/proto/foo/foo_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions tests/well-known/proto/known_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions wasm/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package wasm

import (
"runtime"
"unsafe"
)

Expand Down Expand Up @@ -38,6 +39,9 @@ func Malloc(size uint32) uint32 {
func Free(ptr uint32) {
// Remove the slice from the allocations map so the GC can reclaim it later.
delete(allocations, ptr)

// Let GC run
runtime.Gosched()
}

func PtrToByte(ptr, size uint32) []byte {
Expand Down