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

mthread: reduce memory usage #222

Closed

Conversation

julianrother
Copy link

mthread keeps header data of all messages in memory until it exits without ever using it. With this change it frees the header data of each message right after processing it.

With my test data of ~100000 messages (10GB) passed to mthread with -S this change reduces the peak memory usage from 841MB to 27MB.

mthread keeps header data of all messages in memory until it exits without
ever using it. With this change it frees the header data of each message
right after processing it.
@leahneukirchen
Copy link
Owner

Very good catch, this is a left-over from the previous codebase I extracted mthread from. :)

@julianrother julianrother deleted the mthread-memory-leak branch March 13, 2022 20:34
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.

None yet

2 participants