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

Both MqttClient and BearSSLClient are allocated on the stack instead of the heap. #128

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

aentinger
Copy link
Collaborator

This means that the memory consumption of those two rather large classes are directly visibale in the compilation output since ArduinoIoTCloud is instantiated as a global variable. The heap allocation is not directly visible to the user of the library and so gives the wrong impression that there is a lot of free space left.

…nt) are allocated on the stack instead of the heap.

This means that the memory consumption of those two rather large classes are directly visibale in the compilation output since ArduinoIoTCloud is instantiated as a global variable. The heap allocation is not directly visible to the user of the library and so gives the wrong impression that there is a lot of free space left.
@aentinger aentinger self-assigned this Jun 3, 2020
@aentinger aentinger added the type: enhancement Proposed improvement label Jun 3, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2020

Codecov Report

Merging #128 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #128   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files           4        4           
  Lines         103      103           
=======================================
  Hits          101      101           
  Misses          2        2           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a54e17...52cb45c. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Jun 3, 2020

Memory usage change @52cb45c616907c183788fc4af357ea9243483d68

FQBN Flash Usage RAM For Global Variables
arduino:samd:mkr1000 🔺 +24 🔺 +15504
arduino:samd:mkrgsm1400 🔺 +24 🔺 +15496
arduino:samd:mkrnb1500 🔺 +24 🔺 +15504
arduino:samd:mkrwan1300 0 0
arduino:samd:mkrwifi1010 🔺 +24 🔺 +15504
arduino:samd:nano_33_iot 🔺 +16 🔺 +15504
esp8266:esp8266:huzzah 💚 -48 🔺 +400

@aentinger
Copy link
Collaborator Author

Successfully tested on PROD with

  • MKR WiFi 1010 ✔️
  • Nano 33 IoT ✔️
  • MKR 1000 ✔️
  • ESP 8266 ✔️
  • MKR WAN 1310 ✔️

@aentinger aentinger closed this Jun 3, 2020
@aentinger aentinger reopened this Jun 3, 2020
@aentinger aentinger merged commit c6723e8 into master Jun 3, 2020
@aentinger aentinger deleted the bearssl-static-allocation branch June 3, 2020 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants