Skip to content

Fix many memory leaks#378

Open
MaartenS11 wants to merge 3 commits into
mainfrom
fix/memory-leaks
Open

Fix many memory leaks#378
MaartenS11 wants to merge 3 commits into
mainfrom
fix/memory-leaks

Conversation

@MaartenS11
Copy link
Copy Markdown
Member

@MaartenS11 MaartenS11 commented May 22, 2026

This PR fixes some (but not all) memory leaks in WARDuino. The main goal is to make the reset operation not leak a huge amount of memory so that it can actually be used on larger wasm programs on a microcontroller without crashing because it's running out of memory.

  • Fix init/free module state not freeing everything it allocates
  • Update reset in the debugger so it does not duplicate the module data (I have a basic version locally but it needs some more polish)

…copying the current module

This way the reset operation (13) now no longer duplicates the module everytime it is used.
@MaartenS11 MaartenS11 marked this pull request as ready for review May 26, 2026 12:54
@MaartenS11 MaartenS11 requested a review from tolauwae May 26, 2026 14:11
@tolauwae tolauwae moved this to Under Review in WARDuino Roadmap May 27, 2026
Copy link
Copy Markdown
Member

@tolauwae tolauwae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Long overdue 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Under Review

Development

Successfully merging this pull request may close these issues.

2 participants