-
Notifications
You must be signed in to change notification settings - Fork 14
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
GC pile up and trouble shooting #60
Comments
I never used any special tools. It was all a lot of small tests and trial and error. And it took quite a lot of that at the beginning. I should also mention that I never got things working properly on linux. Only windows, and even then there were occasional issues that I never fully ironed out. I'm not really sure what you are showing in your example and I'm not sure what your question (outside of the one about tools) is. I can say, though, that you shouldn't have to reinitialize the julia runtime between calls to your mex function. However, if you want julia data to persist between calls, you'll need to make sure that a reference is kept for it somewhere on the Julia side. I think it would be sufficient to have a global And if you want julia to be able to refer to some |
Thank you @twadleigh for your quick response. My main concern is that there is a memory leak coming from using the julia API.
|
You can always call
I did my learning about these things mostly by carefully following the documentation on embedding, occasionally chasing deeper into the sources of the API functions (though the insight-to-effort ratio there was often pretty low), gathering insights from experts when they talked about relevant things in the various fora on which I have been lurking for years, but, most of all, by good ol' black-box-interrogation/trial-and-error. |
I am writing some simple mex interfaces that allow me to pass large amounts of data between the two with as little copying as possible. Much of this is inspired by this repo. I was hoping to gain some insight into the debugging process you used with regards to memory management. I have used valgrind, but this is cumbersome. I made a very simple test script, below:
My issue is relate to needing to run the Julia code several times, and I do not want to have close and start a new Julia instance in between calls because of performance needs. I am not as knowledgeable as I need to be to understand if I am/am not allocate memory without deallocation with my methods. Any insight would be helpful.
The text was updated successfully, but these errors were encountered: