Kindelia icon indicating copy to clipboard operation
Kindelia copied to clipboard

Memory leak

Open o-santi opened this issue 2 years ago • 1 comments

The following program, taken from HVM's example on lambda arithmetic, converted to kdl (as done here) and run on KVM leaks space (does not properly clear all the stored data that wasnt used), which then stores unecessary data on the chain. The bigger the numeric operation, the bigger the leak.

This seems to be related with lambda encoded data (in this case, Scott encoded) being passed around, more specifically when multiple erased arguments are applied to other erased arguments (or something like this?). This error seems to be related with this problem on HVM, where the possible fix seems to make the runtime not lazy on some cases, and thus more investigation is needed to draw further conclusions.

o-santi avatar Oct 27 '22 14:10 o-santi