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

Reducing RAM consumption (mainly for Arduino) #1

Open
RodionGork opened this issue Dec 28, 2017 · 2 comments
Open

Reducing RAM consumption (mainly for Arduino) #1

RodionGork opened this issue Dec 28, 2017 · 2 comments

Comments

@RodionGork
Copy link
Owner

Arduino has only 2kb of RAM and much is taken up by constant strings etc, because of separate address space for ROM.

Compiler gives 1356 bytes taken before optimization, of them (500 + 150) for basic memory.

@RodionGork
Copy link
Owner Author

After switching to compare commands and funcs by hashes 1240.
After moving common messages and errors to progmem 1052.

Basic memory could now be enlarged to (650 + 300).

Code becomes slightly uglier but not much.

@RodionGork
Copy link
Owner Author

RodionGork commented Dec 28, 2017

After replacing "charInStr" inside expr.c it becomes 1036

And after removing arrays of commands and function hashes to switches - 996

Basic memories are enlarged to (700 + 300)

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

No branches or pull requests

1 participant