-
Notifications
You must be signed in to change notification settings - Fork 93
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
High dynamic memory usage by SH1106 library #11
Comments
I also notice that the library is not using PROGMEM anywhere. It uses huge dynamic memory (70% to 77%). Which is not good. So I think it should be modified. |
@wonho-maker can you try to solve this issue? |
I have solve this issue of huge dynamic memory |
Does your forked library resolve the issue? |
@theintel You might want to also look at the Adafruit_SH110x library. I compiled one of the examples for an Arduino Uno, which uses nearly 60% of the available code space, while only using 29% of the dynamic memory: "Sketch uses 18770 bytes (58%) of program storage space. Maximum is 32256 bytes. However, it might make more sense to use an Atmega 2560, or an Atmega 1284P, for the extra memory, for use with a graphical display. |
@Andy2No Thanks for that suggestion. It is the neatest solution. |
Yes |
@choudharyanil244 Thanks a lot. I'll give it a go. |
Sure try it out and let me know the results. |
@choudharyanil244 I tried it out. I wanted to check the real-time dynamic memory usage using freeMemory() following this tutorial I included And this was the actual library's: Sorry for dragging this old thread. I don’t exactly know if this represents optimization performance of the library. So someone's expertise would be helpful. |
Hi, your lib in my program takes 1000 bytes more of dynamic memory than SSD1306 library.
Your library SH1106: The global variable use 1.577 byte (77%) of dynamic memory, leaving 471 byte free for local variables. The max is 2.048 byte.
Low memory available, stability problems may occur.
SSD1306: The global variable use 563 byte (27%) of dynamic memory, leaving 1485 byte free for local variables.
That's because of you not using PROGMEM anywhere in library.
The text was updated successfully, but these errors were encountered: