-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Custom Heap Allocation. #696
Conversation
fa16313
to
da2f2d9
Compare
@slaff : |
|
||
void system_show_malloc(void) | ||
{ | ||
umm_info(NULL, 1); |
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.
Hi do you have example output for this function call? I'm curious if this could be used for run time fragmentation monitoring
@hreintke I can check how is the memory allocation done in RTOS and port the same code also for SmingRTOS.
I will be surprised if it is much different than the one in NONOS. But I have to check. Anyone having an idea about this?
@ADiea Because one has control over the memory management functions it is possible to log the memory allocation and should be relatively easy to implement (as done here ). |
da2f2d9
to
7f82800
Compare
It turns out that the heap allocation is open source and can be read from here: |
@slaff : |
@slaff @hreintke probably when running for longer times and using parts that require a lot of reallocs (using a lot of String class) we could run into more trouble. The webserver can cause quite a few reallocs / allocs and fragment the heap |
@patrickjahns : @slaff : These kind of updates, within the hart of the underlying freertos software, should be kept to an absolute minimum. |
@hreintke Sounds reasonable to me concerning RTOS. Then why not merge this PR in NONOS? In NONOS there is an issue with the heap allocation which is easily visible and UMM, integrated in this PR, has better heap allocation. In addition the UMM integration can be switched on and off during compile time with the ENABLE_CUSTOM_HEAP directive. |
@slaff :
Why should we put time and effort in a major update in a version for which support will cease on short notice. |
7f82800
to
0b4bbbc
Compare
The issue in the last post was my fault, not reporting all the allocations. I confirm ummaloc works great and should be merged |
@slaff :
Unless we are solving a very high priority issue, I have no intend to merge this in Sming |
No need to merge for NONOS, closing PR |
Based on umm_malloc. Most of the integration code comes from esp8266/Arduino.
Advantages:
-- Better heap allocation and less fragmentation. We can use the available free heap more efficiently.
Disadvantages:
-- A bit slower than the original mem_manager functions.