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

String: informative messages on issues #8821

Merged
merged 4 commits into from
Jan 26, 2023
Merged

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Jan 20, 2023

  • Always enable messages when serial debug port is enabled
  • Allocation issue was not reported

fixes #8779

Messages are like:

12:14:33.749616204 [String] 'ab1ab2ab3a ... 08ab8309ab': Reallocating large String(48749 -> 48753 bytes)
12:14:33.758096639 [String] 'ab1ab2ab3a ... 11ab8312ab': Reallocating large String(48767 -> 48771 bytes)
12:14:33.766779262 [String] 'ab1ab2ab3a ... 8314ab8315': Reallocating large String(48783 -> 48785 bytes)
12:14:33.774862098 [String] 'ab1ab2ab3a ... 16ab8317ab': Reallocating large String(48797 -> 48801 bytes)
12:14:33.780903383 [String] 'ab1ab2ab3a ... 16ab8317ab': OOM: 48799 -> 48816 bytes
12:14:33.789079777 [String] 'ab1ab2ab3a ... ab8317abab': Reallocating large String(48799 -> 48803 bytes)
12:14:33.797860839 [String] 'ab1ab2ab3a ... ab8317abab': OOM: 48799 -> 48816 bytes
12:14:33.806152000 [String] 'ab1ab2ab3a ... ab8317abab': Reallocating large String(48799 -> 48801 bytes)

from code:

int cnt = 0;
String puffed;

void loop() {
    puffed += "ab";
    puffed += String(++cnt);
}

@d-a-v d-a-v added the alpha included in alpha release label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha included in alpha release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

String: add debugging message in case of allocation failure
2 participants