-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Specify MALLOC_CAP_INTERNAL while calloc()ing heap #61
Comments
For this issue, any thoughts on how I could recreate it? During testing I never ran into this. I won’t be able to merge this for a few weeks, as I’m out of the country, and don’t have access to my test environment |
It came up for me when I enabled both ZgatewayBT and ZgatewayRTL_433 at the same time in OpenMQTTGateway. I suspect that BT is also using an inspecific malloc() scheme and it's defaulting to something other than INTERNAL that's smaller than INTERNAL. |
Its not confirmed yet, but 1technophile/OpenMQTTGateway#1529 MIGHT be the same problem I was running into yet. Their reported symptoms sound similar, after doing the same thing I did. Soooo, maybe chances are good that ticket is reproduction? |
This has been implemented |
https://github.com/NorthernMan54/rtl_433_ESP/blob/master/src/rtl_433_ESP.cpp#L409
I was getting
calloc()
failures, even though there was enough heap reported byESP.getFreeHeap()
andESP.getMaxAllocHeap()
.Those two reporting tools however are calling
heap_caps_
functions, and hard coding a capability ofMALLOC_CAP_INTERNAL
to force reporting heap for Internal memory only.I tested by detecting a
calloc(...)
failure, then trying aheap_cap_calloc(..., MALLOC_CAP_INTERNAL)
which always succeeded.So I propose replacing
calloc(..)
withheap_caps_calloc(..., MALLOC_CAP_INTERNAL)
Pull request incoming. :-)
The text was updated successfully, but these errors were encountered: