kanaka / wac

WebAssembly interpreter in C
Other
472 stars 46 forks source link

Fix grow_memory units #13

Closed geky closed 5 years ago

geky commented 5 years ago

I noticed this while measuring Wac's RAM usage. Great project by the way.

The allocated RAM was quadrupling when Wac hit a grow_memory instruction. It looks like the wrong allocation unit may have been used? Later in wa.c in load_module I noticed a uint8_t was used there suggesting this was a typo.

kanaka commented 5 years ago

Silly mistake. Thanks for catching it!