gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + gno.land: a blockchain for timeless code and fair open-source.
https://gno.land/
Other
898 stars 374 forks source link

feat: scan memory, reset allocator #3148

Open petar-dambovaliev opened 4 days ago

petar-dambovaliev commented 4 days ago

This is as an alternative solution to garbage collection to reclaim memory. If an allocation is about to fail, walk all blocks in the machine and their values and recalculate how much memory is used.

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 10.63830% with 42 lines in your changes missing coverage. Please review. Files with missing lines Patch % Lines
gnovm/pkg/gnolang/alloc.go 2.50% 38 Missing and 1 partial :warning:
gnovm/pkg/gnolang/machine.go 25.00% 2 Missing and 1 partial :warning:

:loudspeaker: Thoughts on this report? Let us know!

petar-dambovaliev commented 14 hours ago

Pending @jaekwon's approval for this approach and i will add tests for this functionality.