-
Notifications
You must be signed in to change notification settings - Fork 52
Define custom memory allocation definitions #193
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
Conversation
What my aim here is to expose the amount of memory being utilized by an erlang process that is currently running.
Hey Matthew, our app fails with segmentation fault with these changes. I'll look into it, but can you also check what may cause it? |
This is good to know. I'll need to do some more load testing with it. |
@laszlohegedus could you provide some information on what may have caused the segfault? |
Sure, it actually happens on startup. I want to check it with Valgrind and see if it tells us why. We're also using libbtc_ex. I wonder if they collide with exqlite. Maybe I'll just try the two in a dummy project. |
Let me know how that goes. I have had trouble getting valgrind to play nice with erlang and
That should not collide with exqlite. |
@warmwaffles Well, it was a pain indeed. I managed to build the beam with valgrind and even "hack" the Elixir executable to use What we can tell now is that we work with exqlite master, but not these changes. I'll dig into the code to see where it fails. At a first glance with my rarely used knowledge of C, the changes look good. |
@warmwaffles I think I found the issue. It's in the |
@laszlohegedus see the latest commit, I lifted the struct method definitions to a static global context, and removed the |
I'm unsure which one is the one we have to set. I think |
0b90340
to
686abe7
Compare
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.
Looks great. Thank you.
What my aim here is to expose the amount of memory being utilized by an erlang vm process that is currently running.
I am opening this up for comment and am probably going to add in some benchmarks and some load testing scripts to go along with this.