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

mergeFiles in Merge/BlockC doesn't free Mempool on error #31

Open
amosr opened this issue Dec 5, 2016 · 1 comment
Open

mergeFiles in Merge/BlockC doesn't free Mempool on error #31

amosr opened this issue Dec 5, 2016 · 1 comment

Comments

@amosr
Copy link
Contributor

amosr commented Dec 5, 2016

mergeFiles doesn't clean up the last Mempool if there's an error.
It creates a memory pool, then every few hundred iterations it creates a new one and copies data over.
It's hard to bracket because the memory pools aren't lexically scoped.

The solution is to store the current iteration state in an IORef or something, so that the bracket end function can read the IORef and free the most recent Mempool.

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

No branches or pull requests

1 participant