Skip to content

Commit

Permalink
Add missing memory limit to main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Jan 6, 2021
1 parent 3c99f3d commit 41f58a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (

const SUPPORTED_FEATURES = "staking"
const PRINT_DEBUG = true
const CACHE_SIZE = 100 // MiB
const MEMORY_LIMIT = 32 // MiB
const CACHE_SIZE = 100 // MiB

// This is just a demo to ensure we can compile a static go binary
func main() {
Expand All @@ -22,7 +23,7 @@ func main() {
fmt.Println("Loaded!")

os.MkdirAll("tmp", 0755)
vm, err := wasmvm.NewVM("tmp", SUPPORTED_FEATURES, PRINT_DEBUG, CACHE_SIZE)
vm, err := wasmvm.NewVM("tmp", SUPPORTED_FEATURES, MEMORY_LIMIT, PRINT_DEBUG, CACHE_SIZE)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 41f58a8

Please sign in to comment.