-
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
Segmentation fault when logistic_map_10_pelemaey(1..10) #161
Comments
If run the following on iex> LogisticMap.logistic_map_10_pelemay(1..16) |
Hey there! I was looking into this a bit and believe there is not enough space being allocated for the internal vector holding the list. Valgrind revealed the following:
In size_t nn = CACHE_LINE_SIZE;
ErlNifSInt64 *t = (ErlNifSInt64 *)enif_alloc(nn); Since I was playing around with something like this that seemed to clear the mem leaks. size_t nn = CACHE_LINE_SIZE;
ErlNifSInt64 *t = (ErlNifSInt64 *)enif_alloc(sizeof(ErlNifSInt64) * length); I'd like to get your thoughts before moving forward with a PR :) |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
iex -S mix
and the following execution:Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
This error occurs even if v0.0.14.
The text was updated successfully, but these errors were encountered: