Skip to content
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

Feature/fix memory leak #1

Merged
3 commits merged into from
Jan 3, 2023
Merged

Feature/fix memory leak #1

3 commits merged into from
Jan 3, 2023

Conversation

ghost
Copy link

@ghost ghost commented Jan 3, 2023

According to maddyblue#23 there is a memory leak bug in the caching of bluestein factors. This addresses this through an lfu cache with a capacity of 64 items. Based on the input length and thus the size of the computed factors this is sufficient.
The max size of the cache can be calculated through:
size_factor = (128*2) / 8 = 32
max_size = size_factor * input_len * 64

E.g.: A 1 sec wav file with sample rate of 44.1 kHz and an arbitrary sample size results in
32 * (1 * 44100) * 64 = 86.13 MByte

@ghost ghost merged commit daf0536 into master Jan 3, 2023
This pull request was closed.
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.

0 participants