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

Small optimisation, save a bit of memory from MicroBitIO. #466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

microbit-carlos
Copy link
Collaborator

@microbit-carlos microbit-carlos commented Feb 19, 2025

Display and buttons pull configuration is done in their own components.
Moving from a ManageBuffer to a plain array saves another 100-ish bytes.
In total with arm-none-eabit-gcc v10.3 this PR saves 174 bytes of flash and moves out the heap allocation for the ManageBuffer.

Display and buttons pull configuration is done in their own
components.
Moving from a ManageBuffer to a plain array saves another 100-ish
bytes.
Copy link

Build diff

Base commit: 78fc71323d231dce9c22287dbe62903f8e383f04
Action run: https://github.com/lancaster-university/codal-microbit-v2/actions/runs/13418095941

     VM SIZE    
 -------------- 
  +0.2%     +12    /home/runner/work/codal-microbit-v2/codal-microbit-v2/source/main.cpp
  +0.0%      +2    [section .text]
  -0.0%     -32    [section .heap]
 -10.9%    -174    /home/runner/work/codal-microbit-v2/codal-microbit-v2/libraries/codal-microbit-v2/model/MicroBitIO.cpp
  -0.0%    -192    TOTAL

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.

1 participant