Skip to content

Commit

Permalink
Merge pull request #480 from metrico/precise_gc
Browse files Browse the repository at this point in the history
feat: use tiny-go precise GC
  • Loading branch information
akvlad authored Mar 19, 2024
2 parents 91a0daf + e17e732 commit 8858cce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wasm_parts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ var data = map[uint32]*ctx{}

//export createCtx
func createCtx(id uint32) {
data[id] = &ctx{}
ctxId := gcContext.GetContextID()
gcContext.SetContext(id)
c := &ctx{}
gcContext.SetContext(ctxId)
data[id] = c
}

//export alloc
Expand Down
Binary file modified wasm_parts/main.wasm.gz
Binary file not shown.

0 comments on commit 8858cce

Please sign in to comment.