Skip to content
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

bugfix: Hangs at startup when custom heap enabled #1996

Merged
merged 3 commits into from
Dec 11, 2019

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Dec 10, 2019

Crashes at startup if umm_info is called before heap initialised.
Fixes #1994.

@mikee47
Copy link
Contributor Author

mikee47 commented Dec 10, 2019

Something I'm chewing over is whether to put all the heap functions into IRAM. (that's where they are for non-custom heap.) The trade off is available IRAM space, figures for HostTests:

  • Normal heap: 5646
  • Custom heap: 6486
  • Custom heap IRAM: 5054

It's a fair chunk of IRAM which is why I'm humming and hawing. Any thoughts?

@slaff
Copy link
Contributor

slaff commented Dec 11, 2019

Any thoughts?

Put them in IRAM. If an application is very low on IRAM the developers can switch to the latest GCC and turn-off custom heap.

@slaff slaff added this to the 4.0.1 milestone Dec 11, 2019
@slaff
Copy link
Contributor

slaff commented Dec 11, 2019

That change:

 void *umm_info( void *ptr, int force ) {
+  if(umm_heap == NULL) {
+    umm_init();
+  }

should be proposed to the upstream repository: https://github.com/rhempel/umm_malloc.git

@slaff
Copy link
Contributor

slaff commented Dec 11, 2019

@mikee47 Do you have something to add here?

@mikee47
Copy link
Contributor Author

mikee47 commented Dec 11, 2019

Nope, all done.

@slaff slaff merged commit e7d24fa into SmingHub:develop Dec 11, 2019
@slaff slaff removed the 0 - Backlog label Dec 11, 2019
@mikee47 mikee47 deleted the fix/umm-malloc branch December 11, 2019 13:18
@slaff slaff mentioned this pull request Jan 2, 2020
4 tasks
slaff pushed a commit to slaff/Sming that referenced this pull request Feb 6, 2020
New features
------------------
- No-WiFi build option SmingHub#2004 - get more resources if your application is not using WIFI.
- Multiple SSL adapters based on axTLS and BearSSL.  SmingHub#1999
- Added basic Crypto support library SmingHub#2014
- Updates framework to build using GCC 9.2.0 toolchain for C++17. SmingHub#1825
- Modbus master SmingHub#1992
- Implemented Small String Optimisation (SSO). SmingHub#1951
- Webcam stream and sample webcam web server. SmingHub#1981
- Allow HTTP connections to ignore rejected body content SmingHub#1928

Improvements
-------------------
- Some improvements to multipart parser SmingHub#2007
- Update ArduinoJson to 6.13.0 SmingHub#1979
- Added precaching from Arduino for ESP8266. SmingHub#1965
- Add support for 'Expect: 100-continue' in HTTP server. SmingHub#1931
- Upgrade to FlashString Library  SmingHub#1974, SmingHub#2013

Bug fixes
-------------
- Updated mqtt-codec to allow publish messages without payload. SmingHub#1976
- HttpConnection freed twice. SmingHub#1938
- Hangs at startup when custom heap enabled. SmingHub#1996
- Fix issues reported by valgrind SmingHub#2017

Breaking changes and Migration
-------------------------------------------
- See our [dedicated page](https://sming.readthedocs.io/en/latest/upgrading/4.0-4.1.html) for migration from 4.0.0 to 4.1.0.

All PRs scheduled for this release can be seen from [here](https://github.com/SmingHub/Sming/milestone/23)
slaff pushed a commit to slaff/Sming that referenced this pull request Feb 6, 2020
New features
------------------
- No-WiFi build option SmingHub#2004 - get more resources if your application is not using WIFI.
- Multiple SSL adapters based on axTLS and BearSSL.  SmingHub#1999
- Added basic Crypto support library SmingHub#2014
- Updates framework to build using GCC 9.2.0 toolchain for C++17. SmingHub#1825
- Modbus master SmingHub#1992
- Implemented Small String Optimisation (SSO). SmingHub#1951
- Webcam stream and sample webcam web server. SmingHub#1981
- Allow HTTP connections to ignore rejected body content SmingHub#1928

Improvements
-------------------
- Some improvements to multipart parser SmingHub#2007
- Update ArduinoJson to 6.13.0 SmingHub#1979
- Added precaching from Arduino for ESP8266. SmingHub#1965
- Add support for 'Expect: 100-continue' in HTTP server. SmingHub#1931
- Upgrade to FlashString Library  SmingHub#1974, SmingHub#2013

Bug fixes
-------------
- Updated mqtt-codec to allow publish messages without payload. SmingHub#1976
- HttpConnection freed twice. SmingHub#1938
- Hangs at startup when custom heap enabled. SmingHub#1996
- Fix issues reported by valgrind SmingHub#2017

Breaking changes and Migration
-------------------------------------------
- See our [dedicated page](https://sming.readthedocs.io/en/latest/upgrading/4.0-4.1.html) for migration from 4.0.0 to 4.1.0.

All PRs scheduled for this release can be seen from [here](https://github.com/SmingHub/Sming/milestone/23)
@mikee47 mikee47 restored the fix/umm-malloc branch November 12, 2020 20:20
@mikee47 mikee47 deleted the fix/umm-malloc branch November 12, 2020 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom heap broken
2 participants