-
Notifications
You must be signed in to change notification settings - Fork 70
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
Fixing memory leaks #34
base: dev
Are you sure you want to change the base?
Conversation
…p and never freeing it
…ng a bare pointer. This was one of the causes for memory leak in PTX mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another good change that died on the vine @FJShen - what would it take to move this from "draft" to "done"?
I think that will involve a lot of work. To merge this PR itself is just about pulling in the latest changes from the dev branch (and resolving any conflicts), but there's no guarantee that this PR solves the memory leak problem. Primary reason is that, there are so many raw "new" allocations everywhere in the code, including cases where the program allocates a vector of elements, but deallocate them individually here and there (if I recall correctly). To rectify these issues involves some vast restructuring. Valgrind does not offer much help. On the other hand I did not notice significant memory leak at a high level, in the form of continuous memory footprint growth. Reports of memory leak from the community were quite sparse. |
OK, thanks, Fangjia! I don't think we have a serious leak problem, but we do have a serious orthogonal over-allocation problem with large traces. 2 other points:
|
Sorry for the misunderstanding. I don't blame you @tgrogers I've modified the comment to de-personify the statement. |
The old PR #31 is closed. This PR is tracking a dedicated branch "FJShen:leakfix" .