Fixed incorrect parameters for memory deallocation

This commit is contained in:
2025-02-09 15:25:25 +01:00
parent ade1fd8fff
commit b1228be79a
4 changed files with 11 additions and 9 deletions

View File

@ -0,0 +1,7 @@
import mem
main() {
address := mem.alloc(1024)
err := mem.free(address, 1024)
assert err == 0
}

View File

@ -59,6 +59,7 @@ var programs = []struct {
{"switch", "", "", 0},
{"loop", "", "", 0},
{"loop-lifetime", "", "", 0},
{"memory-free", "", "", 0},
{"out-of-memory", "", "", 0},
{"struct", "", "", 0},
}