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

Memory leak persists #9

Open
tiagopereira opened this issue Nov 12, 2014 · 4 comments
Open

Memory leak persists #9

tiagopereira opened this issue Nov 12, 2014 · 4 comments
Labels

Comments

@tiagopereira
Copy link
Member

There are still memory leaks in RH. They are rather small, but come up as an issue when running a large simulation outside of a supercomputer. This happens also with the lteray binary, so that could narrow down the places where it happens.

@tiagopereira
Copy link
Member Author

Seems that saving tau=1 depths "doubles" the memory leak. Could be important info.

@tiagopereira
Copy link
Member Author

With 4367329 it seems that some memory leak with B projections was closed. Probably not the final say.

@Goobley
Copy link
Contributor

Goobley commented Jun 6, 2019

The memory leaks I have found so far are:

  • Various temporary allocations used in Profile aren't free'd. My fix is here.
  • CollisionRate allocated atom->C but this is normally allocated in readAtom, so just check whether it's non-NULL and free the matrix if there's something there already. See here

I can't directly submit pull requests for these at the moment, due to the other changes I have made to my fork, but if desired I can submit a PR for these. With these changes in place, running rhf1d (including with SOLVE_NE = ITERATION), valgrind reports no leaked memory.

@tiagopereira
Copy link
Member Author

tiagopereira commented Jun 7, 2019

Thanks for looking into this. If you can submit a PR, that would be great and nicer for you to have credit for these changes. I need to double check it with the 1.5D version, but otherwise looks fine!

tiagopereira added a commit that referenced this issue Jun 13, 2019
Memory leak fixes as discussed in #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants