Skip to content

[AUDIO_WORKLET] Add interactive heap growing test NFC #24931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cwoffenden
Copy link
Contributor

@cwoffenden cwoffenden commented Aug 14, 2025

This adds an interactive test to force growing the heap during playback:

test/runner interactive.test_audio_worklet_memory_growth

Tested with interactive64 and interactive_2gb (for interactive64_4gb the heap is already at the browser's max in testing so can't be grown).

It works by alloc'ing and leaking 2/3 of the current size until it can no longer do so. Emscripten regrows its wasm memory in the process, invalidating any data views (see #24891).

Edit: test can now grow from both the main and audio thread.

@cwoffenden cwoffenden changed the title [AUDIO_WORKLET] Add interactive heap growing test [AUDIO_WORKLET] Add interactive heap growing test NFC Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants