Commit graph

2 commits

Author SHA1 Message Date
刘皓
fac72be163
Fix a second Ruby memory leak
Okay, I think that fixes all the memory leaks. Finally! I'll submit a
pull request to Ruby to fix both of the memory leaks.
2025-03-27 00:28:37 -04:00
刘皓
82444abed2
Fix stack pointer leak in libretro builds
There's currently a memory leak in libretro builds where memory usage
increases by several kilobytes every frame you hold down an arrow key
while the player character is visible on the map in KNight-Blade.

This fixes a bug where parts of the WebAssembly stack are leaked when an
exception is caught in Ruby. There seems to be another source of memory
leaking, though, because memory usage still increases by several
kilobytes every frame like before.

I'm pretty sure this bug I fixed is an internal Ruby bug that I should
be creating a pull request to fix. I'll create one once I fully fix the
memory leak, since there might be more Ruby bugs that I have yet to
find.
2025-03-25 16:19:08 -04:00